- or download this
$1$ZD1qsc8PwUXqP9GihP+NHvWQ+FXap4Td0KWCMp8yrDQ=B71E718B3CC3262CC83F15B
+B2A97A2C5429B2028D217A90D6D7E275E08F68A4AE69526B8FE05CFE06EAC5B8E0958
+B372FAC6040E36BEFB0F681ADE7F7E9861BE
- or download this
use MIME::Base64 qw(encode_base64);
my $hash = "B71E718B3CC3262CC83F15BB2A97A2C5429B2028D217A90D6D7E275E08
+F68A4AE69526B8FE05CFE06EAC5B8E0958B372FAC6040E36BEFB0F681ADE7F7E9861B
+E";
...
my $saved = '$6$' . $salt . '$' . $b64hash;
my $wild = "password";
print "OK" if crypt($wild, $saved) eq $saved;
- or download this
$6$ZD1qsc8PwUXqP9Gi$D72oiWMfTm90ZFouvu.aU3C6UCOPGKyS2jbZSKefD8IGo13x49
+7sRFX8062y30pGIIc/KtC6aq9qui.FuKm6Y1
- or download this
use Crypt::SaltedHash;
use MIME::Base64 qw(decode_base64);
...
print "Salt= $salt\n"; # to show that it is using the right salt
print "hex encoded = " . unpack('H*',substr($shash,9)) . "\n";
# the substr is required as generate prepends {SSHA512}