Example method - script by atom.
Code:
#!/usr/bin/perl
use strict;
use warnings;
use MIME::Base64;
while (my $line = <>)
{
chomp $line;
my @data = split '\$', $line;
if ($data[5] ne 64)
{
die "invalid\n";
}
my ($user, undef) = split '\:', $data[0];
my $hash_bin = decode_base64($data[6]);
my $hash_trunc = encode_base64(substr($hash_bin, 0, 32), "");
my $salt_enc = encode_base64 ($data[1], "");
printf ("%s:SCRYPT:%d:%d:%d:%s:%s\n", $user, 1<<$data[2], $data[3], $data[4], $salt_enc, $hash_trunc);
}
~