We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this questionI'm looking for a library (or preferably built into java) that will able to take a password and it's hash, determine what type of encryption was used and validate the password.
Essentially the java version of http://xref.dokuwiki.org/reference/dokuwiki/nav.html?inc/PassHash.class.php.html
To be honest I've already converted most of it already but I'm not sure how to create a Salted md5 password in java (converting the hash_smd5 function) and DES encryption with a salt (converting the hash_crypt function)
Any help will be very much appreciated.
Is this what you're trying to achieve? Given
- original text (password, or salted password)
- encrypted text
- a list of encryption/hashing algorithm (MD5, SHA1, etc.)
Figure out which encryption algorithm produced the enrypted text? Presumably this would be achieved by applying each algorithm in turn to the original text until the output matches the encrypted text?
The DigestUtils class from Apache Commons provides a whole bunch of easy-to-use hash functions. Also Bouncy Castle provides a large number of Java implementations of encryption standards.
精彩评论