It's not a secret anymore!
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
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
It's not a secret anymore!