X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=blobdiff_plain;f=lib%2FFile%2FKDBX%2FDumper.pm;h=6f8d8bb120936ab361606df3bf8157ac171c4f49;hp=7e2741c9353fb1212b03e168bec57110a946c403;hb=63d73bf382edfb0089b36a45193fc2835cb58b6d;hpb=37b09e0f2832514b33de4499a83f22d5ffe7c0a3 diff --git a/lib/File/KDBX/Dumper.pm b/lib/File/KDBX/Dumper.pm index 7e2741c..6f8d8bb 100644 --- a/lib/File/KDBX/Dumper.pm +++ b/lib/File/KDBX/Dumper.pm @@ -93,7 +93,7 @@ sub _rebless { $dumper = $dumper->reset; -Set a L to a blank state, ready to dumper another KDBX file. +Set a L to a blank state, ready to dump another KDBX file. =cut @@ -111,7 +111,7 @@ sub reset { Dump a KDBX file. -The C<$key> is either a L or a primitive that can be converted to a Key object. +The C<$key> is either a L or a primitive that can be cast to a Key object. =cut @@ -202,7 +202,7 @@ sub dump_file { $dumper->dump_handle($fh, $key); $dumper->dump_handle(*IO, $key); -Dump a KDBX file to an input stream / file handle. +Dump a KDBX file to an output stream / file handle. =cut @@ -289,19 +289,6 @@ has 'inner_format', is => 'ro', default => 'XML'; has 'allow_upgrade', is => 'ro', default => 1; has 'randomize_seeds', is => 'ro', default => 1; -=method min_version - - $min_version = File::KDBX::Dumper->min_version; - -Get the minimum KDBX file version supported, which is 3.0 or C<0x00030000> as -it is encoded. - -To generate older KDBX files unsupported by this module, try L. - -=cut - -sub min_version { KDBX_VERSION_OLDEST } - sub _fh { $_[0]->{fh} or throw 'IO handle not set' } sub _dump { @@ -358,7 +345,7 @@ sub _write_magic_numbers { my $kdbx = $self->kdbx; $kdbx->sig1 == KDBX_SIG1 or throw 'Invalid file signature', sig1 => $kdbx->sig1; - $kdbx->version < $self->min_version || KDBX_VERSION_LATEST < $kdbx->version + $kdbx->version < KDBX_VERSION_OLDEST || KDBX_VERSION_LATEST < $kdbx->version and throw 'Unsupported file version', version => $kdbx->version; my @magic = ($kdbx->sig1, $kdbx->sig2, $kdbx->version);