This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Security and the fly likes SHA1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "SHA1 " Watch "SHA1 " New topic


Jeffery Young

Joined: Feb 27, 2009
Posts: 1
I'm writing a simple java application that allows one to register a username and password. The username will be stored to a simple .txt file in clear text and the password is to be hashed using SHA1 and stored next to the username in the file. This is for demonstration purposes only, not for a program in use. Any ideas on where I can find how to hash a string using SHA1 with Java?
greg stark
Ranch Hand

Joined: Aug 10, 2006
Posts: 220
google would be an excellent start. See also the MessageDigest class in the javadocs, and the JCE reference guide.

Nice to meet you.
I agree. Here's the link:
subject: SHA1
Similar Threads
Reading password information from a text file.
how to test (junit4) this mysql funciton?
Encrypted Password for Oracle JDBC
Password encryption in tomcat 5.
Password Encryption