]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/Dumper/V3.pm
Fix dumping wrong-sized encryption IV
[chaz/p5-File-KDBX] / lib / File / KDBX / Dumper / V3.pm
index 22ddf57bf83537752f3beb82f4ceac9ec0603981..e5c8877d7b32b134685a291bc1d3fbbc73615176 100644 (file)
@@ -31,6 +31,11 @@ sub _write_headers {
     local $headers->{+HEADER_TRANSFORM_SEED} = $kdbx->transform_seed;
     local $headers->{+HEADER_TRANSFORM_ROUNDS} = $kdbx->transform_rounds;
 
+    my $got_iv_size = length($headers->{+HEADER_ENCRYPTION_IV});
+    alert 'Encryption IV should be exactly 16 bytes long',
+        got         => $got_iv_size,
+        expected    => 16 if $got_iv_size != 16;
+
     if (nonempty (my $comment = $headers->{+HEADER_COMMENT})) {
         $buf .= $self->_write_header($fh, HEADER_COMMENT, $comment);
     }
This page took 0.017324 seconds and 4 git commands to generate.