|
|
|
@ -5,7 +5,7 @@ |
|
|
|
|
|
|
|
|
|
# change 'tests => 1' to 'tests => last_test_to_print'; |
|
|
|
|
|
|
|
|
|
use Test::More tests => 20; |
|
|
|
|
use Test::More tests => 21; |
|
|
|
|
use Digest::MD5 qw(md5 md5_hex md5_base64); |
|
|
|
|
use strict; |
|
|
|
|
|
|
|
|
@ -39,3 +39,8 @@ ok( |
|
|
|
|
$c->decryptHex( $c->encryptHex( $data, $secondKey ), $secondKey ) eq $data, |
|
|
|
|
"Test of hexadecimal encrypting" |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
# Test a long value, and replace carriage return by %0A |
|
|
|
|
my $long = "f5a1f72e7ab2f7712855a068af0066f36bfcf2c87e6feb9cf4200da1868e1dfe"; |
|
|
|
|
my $cryptedlong ="Da6sYxp9NCXv8+8TirqHmPWwTQHyEGmkCBGCLCX/81dPSMwIQVQNV7X9KG3RrKZfyRmzJR6DZYdU%0Ab75+VH3+CA=="; |
|
|
|
|
ok ( $c->decrypt( $cryptedlong ) eq $long, "Test of long value encrypting" ); |
|
|
|
|