Skip to main content

crypt(3) $6$ password hash algorythm (based on SHA-512) in Java?



I'm looking for a Java function to generate/verify password hashes that were encoded in the way crypt(3) does when storing them in the Linux /etc/shadow file if sha512 is activated in /etc/pam.d/common-password.





E.g. the plaintext string "geheim" will translate to: "$6$WoC532HB$LagBJ00vAGNGu8p9oeYDOSNZo9vTNTzOgPA.K0bJoiXfbcpj3jBuTkNwdzCrSNadRi8LanH1tH6tGGPPp/Lp3."





From http://www.akkadia.org/drepper/SHA-crypt.txt I understand that, like with MD5, it's not just a SHA hash like DigestUtils or the Java MessageDigest classes produces but an algorithm that does a bit more magic.


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?