Skip to content

Instantly share code, notes, and snippets.

@rustyconover
Created April 19, 2014 23:22
Show Gist options
  • Save rustyconover/11100567 to your computer and use it in GitHub Desktop.
Save rustyconover/11100567 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Benchmark;
use Crypt::ScryptKDF qw(scrypt_hash random_bytes);
my $types = {
map {
my $v = $_;
$v => sub {
scrypt_hash("s3kr1t_password", random_bytes(), 2**$v, 8, 1, 32);
}
} (7..15)
};
print "Scrypt work factor:\n";
Benchmark::cmpthese(500, $types);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment