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.',
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.',
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';