X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=blobdiff_plain;f=t%2Fcrypt.t;h=abb6dc6fc341bcaedbab7773dbf4de91bdcb5f00;hp=c003a5fc517c35c9b8ca7ca267283c23c2adac0f;hb=5950244f5eaeda8ec5f83b236552217ec5d480cb;hpb=50f1a929d9224b9072b5fae39162a5d943323c5d diff --git a/t/crypt.t b/t/crypt.t index c003a5f..abb6dc6 100644 --- a/t/crypt.t +++ b/t/crypt.t @@ -15,6 +15,7 @@ use Test::More; subtest 'Round-trip block stream' => sub { plan tests => 3; + my $block_cipher = File::KDBX::Cipher->new(uuid => CIPHER_UUID_AES256, key => 0x01 x 32, iv => 0x01 x 16); test_roundtrip($block_cipher, 'Smell the pretty flowers.', @@ -24,6 +25,7 @@ subtest 'Round-trip block stream' => sub { subtest 'Round-trip cipher stream' => sub { plan tests => 3; + my $cipher_stream = File::KDBX::Cipher->new(stream_id => 2, key => 0x01 x 16); test_roundtrip($cipher_stream, 'Smell the pretty flowers.', @@ -38,7 +40,7 @@ subtest 'Error handling' => sub { pipe(my $read, my $write) or die "pipe failed: $!"; $read = File::KDBX::IO::Crypt->new($read, cipher => $block_cipher); - print $write "blah blah blah!\1"; + print $write "blah blah blah!"; # should produce: FATAL: cipher text length has to be multiple of 16 (15) close($write) or die "close failed: $!"; is $read->error, '', 'Read handle starts out fine';