Skip to content

Instantly share code, notes, and snippets.

View wernerb's full-sized avatar
🏠
Working from home

Werner Buck wernerb

🏠
Working from home
View GitHub Profile
@wernerb
wernerb / gist:6a52e77b0b8974714263
Last active August 28, 2015 08:31 — forked from evandrix/gist:1076041
Using bcrypt to secure passwords in a Perl application
#!/usr/bin/perl
use Crypt::Eksblowfish::Bcrypt;
use Crypt::Random;
$password = 'bigtest';
$encrypted = encrypt_password($password);
print "$password is encrypted as $encrypted\n";
print "Yes the password is $password\n" if check_password($password, $encrypted);
print "No the password is not smalltest\n" if !check_password('smalltest', $encrypted);