]> Dogcows Code - chaz/p5-File-KDBX/commitdiff
Fix CryptX 0.062 functionality change
authorCharles McGarvey <ccm@cpan.org>
Mon, 1 Aug 2022 02:18:24 +0000 (20:18 -0600)
committerCharles McGarvey <ccm@cpan.org>
Mon, 1 Aug 2022 02:30:46 +0000 (20:30 -0600)
Declare CryptX 0.055 to be the oldest supported version; that is the
first version to support salsa20, so that really is the oldest we could
support. Fixes #1.

Changes
dist.ini
lib/File/KDBX/Cipher/Stream.pm
t/crypt.t

diff --git a/Changes b/Changes
index 9b2787baa46611891fd55a5236d4292464566bc8..f129e6133f76018f7d25507e7855333b04dff5d0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
 Revision history for File-KDBX.
 
 {{$NEXT}}
+  * Declare CryptX 0.055 as a required dependency. Thanks HIGHTOWE.
 
 0.904     2022-07-07 21:51:17-0600
   * Use expanded title, username in OTP parameters.
index bcb8902686294e2bf255e01564224f608918f025..478e9654855bc95b3df10653cccd1891b1acde18 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -8,8 +8,18 @@ license             = Perl_5
 Test::CleanNamespaces.skip[0]   = ::Util|::KDF::AES$
 RepoReadme.type     = gfm
 
+[Prereqs / RuntimeRequires]
+Crypt::Cipher::AES      = 0
+Crypt::Stream::ChaCha   = 0.048
+Crypt::Stream::Salsa20  = 0.055
+
 [Prereqs / RuntimeRecommends]
-File::Spec          = 0
+File::Spec              = 0
+
+[Prereqs / RuntimeSuggests]
+; These are some non-standard ciphers which KeePass can support with plugins:
+Crypt::Stream::Twofish  = 0
+Crypt::Stream::Serpent  = 0.055
 
 [Prereqs / TestSuggests]
 POSIX::1003         = 0
index 367619acbd1548bc0055420e2e251b5f1d081247..7ecb396854bc86a6dc707fa7be199119b8500c9e 100644 (file)
@@ -122,6 +122,7 @@ sub _stream {
                 $counter = int($offset / 64);
                 $pos = $offset % 64;
             }
+            load $pkg;
             my $s = $pkg->new($self->key, $self->iv, $counter);
             # seek to correct position within block
             $s->keystream($pos) if $pos;
index 69a52efb33dfad5a75382be33bd3e2847f8f78f9..abb6dc6fc341bcaedbab7773dbf4de91bdcb5f00 100644 (file)
--- a/t/crypt.t
+++ b/t/crypt.t
@@ -40,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';
This page took 0.032352 seconds and 4 git commands to generate.