File: bcrypt_hash.t

package info (click to toggle)
libcrypt-eksblowfish-perl 0.009-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 212 kB
  • sloc: perl: 132; makefile: 2
file content (16 lines) | stat: -r--r--r-- 475 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use warnings;
use strict;

use Test::More tests => 3;

BEGIN { use_ok "Crypt::Eksblowfish::Bcrypt", qw(bcrypt_hash); }

is bcrypt_hash({ key_nul => 0, cost => 5, salt => "abcdefghijklmnop" },
	       "supercalifragilisticexpialidocious"),
   pack("H*", "1e514c325869b8c311f852ffe630bac51519a66409ed77");

is bcrypt_hash({ key_nul => 1, cost => 6, salt => "ABCDEFGHIJKLMNOP" },
	       "Libelar! Timmah!"),
   pack("H*", "2b7453cbc43bc27cb59c1a1a2ce520d79557f7a1a17b9b");

1;