So, I have a website that reads / verifies (and writes) password hashes from the database, and I have something that makes SHA-512 style password hashes for them:
$6$GloHensinmyampOc$AxvlkxxXk36oDOyu8phBzbCfLn8hyWgoYNEuqNS.3dHf4JJrwlYCqha/g6pA7HJ1WwsADjWU4Qz8MfSWM2w6F.
The website is Java based, so I wrote SHA-512 for it. The problem is that there are several perl cron jobs that run this one and to occasionally check the password hashes for the database, and since those that run in the Solaris window, this crypto does not support the $ 6 $ format.
So when I do this:
printf("crypt => '%s'\n",crypt("Hello",'$1$CygnieHyitJoconf$'));
I come back reasonably:
crypt => '$1$CygnieHy$n9MlDleP0qmGCfpbnVYy11'
Whereas if I do
printf("crypt => '%s'\n",crypt("Hello",'$6$CygnieHyitJoconf$'));
I get useless
crypt => ''
Is there a way to get SHA-512 password hashes in Perl on a field that does not use glibc? (This is what they tell me when I usually search ("use crypt").
I would prefer not to reinstall the SHA-512 password hashes in perl.
Thanks!
source share