scrypt hash format
#3
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);

}
~
Reply


Messages In This Thread
scrypt hash format - by arlininger - 08-09-2019, 07:01 PM
RE: scrypt hash format - by undeath - 08-12-2019, 11:19 AM
RE: scrypt hash format - by royce - 08-14-2019, 04:15 PM