Revision history for File-KDBX.
+0.903 2022-05-11 17:17:13-0600
+
+ * Fixed parsing KDBX4 datetimes on 32-bit perls.
+ * Fixed broken tests on perls < 5.14.
+
0.902 2022-05-03 19:18:06-0600
* Added support for 32-bit perls.
"IPC::Cmd" : "0.84",
"Iterator::Simple" : "0",
"List::Util" : "1.33",
- "Math::BigInt" : "0",
+ "Math::BigInt" : "1.993",
"Module::Load" : "0",
"Module::Loaded" : "0",
"POSIX" : "0",
"Storable" : "0",
"Symbol" : "0",
"Text::ParseWords" : "0",
- "Time::Piece" : "0",
+ "Time::Piece" : "1.33",
"XML::LibXML" : "0",
"XML::LibXML::Reader" : "0",
"boolean" : "0",
"Getopt::Std" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
+ "Math::BigInt" : "1.993",
"Test::Deep" : "0",
"Test::Fatal" : "0",
- "Test::More" : "0",
+ "Test::More" : "1.001004_001",
"Test::Warnings" : "0",
"lib" : "0",
"utf8" : "0"
"provides" : {
"File::KDBX" : {
"file" : "lib/File/KDBX.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Cipher" : {
"file" : "lib/File/KDBX/Cipher.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Cipher::CBC" : {
"file" : "lib/File/KDBX/Cipher/CBC.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Cipher::Stream" : {
"file" : "lib/File/KDBX/Cipher/Stream.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Constants" : {
"file" : "lib/File/KDBX/Constants.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Dumper" : {
"file" : "lib/File/KDBX/Dumper.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Dumper::KDB" : {
"file" : "lib/File/KDBX/Dumper/KDB.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Dumper::Raw" : {
"file" : "lib/File/KDBX/Dumper/Raw.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Dumper::V3" : {
"file" : "lib/File/KDBX/Dumper/V3.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Dumper::V4" : {
"file" : "lib/File/KDBX/Dumper/V4.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Dumper::XML" : {
"file" : "lib/File/KDBX/Dumper/XML.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Entry" : {
"file" : "lib/File/KDBX/Entry.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Error" : {
"file" : "lib/File/KDBX/Error.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Group" : {
"file" : "lib/File/KDBX/Group.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::IO" : {
"file" : "lib/File/KDBX/IO.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::IO::Crypt" : {
"file" : "lib/File/KDBX/IO/Crypt.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::IO::HashBlock" : {
"file" : "lib/File/KDBX/IO/HashBlock.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::IO::HmacBlock" : {
"file" : "lib/File/KDBX/IO/HmacBlock.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Iterator" : {
"file" : "lib/File/KDBX/Iterator.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::KDF" : {
"file" : "lib/File/KDBX/KDF.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::KDF::AES" : {
"file" : "lib/File/KDBX/KDF/AES.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::KDF::Argon2" : {
"file" : "lib/File/KDBX/KDF/Argon2.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Key" : {
"file" : "lib/File/KDBX/Key.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Key::ChallengeResponse" : {
"file" : "lib/File/KDBX/Key/ChallengeResponse.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Key::Composite" : {
"file" : "lib/File/KDBX/Key/Composite.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Key::File" : {
"file" : "lib/File/KDBX/Key/File.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Key::Password" : {
"file" : "lib/File/KDBX/Key/Password.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Key::YubiKey" : {
"file" : "lib/File/KDBX/Key/YubiKey.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Loader" : {
"file" : "lib/File/KDBX/Loader.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Loader::KDB" : {
"file" : "lib/File/KDBX/Loader/KDB.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Loader::Raw" : {
"file" : "lib/File/KDBX/Loader/Raw.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Loader::V3" : {
"file" : "lib/File/KDBX/Loader/V3.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Loader::V4" : {
"file" : "lib/File/KDBX/Loader/V4.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Loader::XML" : {
"file" : "lib/File/KDBX/Loader/XML.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Object" : {
"file" : "lib/File/KDBX/Object.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Safe" : {
"file" : "lib/File/KDBX/Safe.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Transaction" : {
"file" : "lib/File/KDBX/Transaction.pm",
- "version" : "0.902"
+ "version" : "0.903"
},
"File::KDBX::Util" : {
"file" : "lib/File/KDBX/Util.pm",
- "version" : "0.902"
+ "version" : "0.903"
}
},
"release_status" : "stable",
"web" : "https://github.com/chazmcgarvey/File-KDBX"
}
},
- "version" : "0.902",
+ "version" : "0.903",
"x_authority" : "cpan:CCM",
"x_generated_by_perl" : "v5.34.1",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.27",
Getopt::Std: '0'
IO::Handle: '0'
IPC::Open3: '0'
+ Math::BigInt: '1.993'
Test::Deep: '0'
Test::Fatal: '0'
- Test::More: '0'
+ Test::More: 1.001004_001
Test::Warnings: '0'
lib: '0'
utf8: '0'
provides:
File::KDBX:
file: lib/File/KDBX.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Cipher:
file: lib/File/KDBX/Cipher.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Cipher::CBC:
file: lib/File/KDBX/Cipher/CBC.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Cipher::Stream:
file: lib/File/KDBX/Cipher/Stream.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Constants:
file: lib/File/KDBX/Constants.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Dumper:
file: lib/File/KDBX/Dumper.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Dumper::KDB:
file: lib/File/KDBX/Dumper/KDB.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Dumper::Raw:
file: lib/File/KDBX/Dumper/Raw.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Dumper::V3:
file: lib/File/KDBX/Dumper/V3.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Dumper::V4:
file: lib/File/KDBX/Dumper/V4.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Dumper::XML:
file: lib/File/KDBX/Dumper/XML.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Entry:
file: lib/File/KDBX/Entry.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Error:
file: lib/File/KDBX/Error.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Group:
file: lib/File/KDBX/Group.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::IO:
file: lib/File/KDBX/IO.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::IO::Crypt:
file: lib/File/KDBX/IO/Crypt.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::IO::HashBlock:
file: lib/File/KDBX/IO/HashBlock.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::IO::HmacBlock:
file: lib/File/KDBX/IO/HmacBlock.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Iterator:
file: lib/File/KDBX/Iterator.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::KDF:
file: lib/File/KDBX/KDF.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::KDF::AES:
file: lib/File/KDBX/KDF/AES.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::KDF::Argon2:
file: lib/File/KDBX/KDF/Argon2.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Key:
file: lib/File/KDBX/Key.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Key::ChallengeResponse:
file: lib/File/KDBX/Key/ChallengeResponse.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Key::Composite:
file: lib/File/KDBX/Key/Composite.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Key::File:
file: lib/File/KDBX/Key/File.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Key::Password:
file: lib/File/KDBX/Key/Password.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Key::YubiKey:
file: lib/File/KDBX/Key/YubiKey.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Loader:
file: lib/File/KDBX/Loader.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Loader::KDB:
file: lib/File/KDBX/Loader/KDB.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Loader::Raw:
file: lib/File/KDBX/Loader/Raw.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Loader::V3:
file: lib/File/KDBX/Loader/V3.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Loader::V4:
file: lib/File/KDBX/Loader/V4.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Loader::XML:
file: lib/File/KDBX/Loader/XML.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Object:
file: lib/File/KDBX/Object.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Safe:
file: lib/File/KDBX/Safe.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Transaction:
file: lib/File/KDBX/Transaction.pm
- version: '0.902'
+ version: '0.903'
File::KDBX::Util:
file: lib/File/KDBX/Util.pm
- version: '0.902'
+ version: '0.903'
recommends:
Compress::Raw::Zlib: '0'
File::KDBX::XS: '0'
IPC::Cmd: '0.84'
Iterator::Simple: '0'
List::Util: '1.33'
- Math::BigInt: '0'
+ Math::BigInt: '1.993'
Module::Load: '0'
Module::Loaded: '0'
POSIX: '0'
Storable: '0'
Symbol: '0'
Text::ParseWords: '0'
- Time::Piece: '0'
+ Time::Piece: '1.33'
XML::LibXML: '0'
XML::LibXML::Reader: '0'
boolean: '0'
bugtracker: https://github.com/chazmcgarvey/File-KDBX/issues
homepage: https://github.com/chazmcgarvey/File-KDBX
repository: https://github.com/chazmcgarvey/File-KDBX.git
-version: '0.902'
+version: '0.903'
x_authority: cpan:CCM
x_generated_by_perl: v5.34.1
x_serialization_backend: 'YAML::Tiny version 1.73'
"IPC::Cmd" => "0.84",
"Iterator::Simple" => 0,
"List::Util" => "1.33",
- "Math::BigInt" => 0,
+ "Math::BigInt" => "1.993",
"Module::Load" => 0,
"Module::Loaded" => 0,
"POSIX" => 0,
"Storable" => 0,
"Symbol" => 0,
"Text::ParseWords" => 0,
- "Time::Piece" => 0,
+ "Time::Piece" => "1.33",
"XML::LibXML" => 0,
"XML::LibXML::Reader" => 0,
"boolean" => 0,
"Getopt::Std" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
+ "Math::BigInt" => "1.993",
"Test::Deep" => 0,
"Test::Fatal" => 0,
- "Test::More" => 0,
+ "Test::More" => "1.001004_001",
"Test::Warnings" => 0,
"lib" => 0,
"utf8" => 0
},
- "VERSION" => "0.902",
+ "VERSION" => "0.903",
"test" => {
"TESTS" => "t/*.t"
}
"IPC::Open3" => 0,
"Iterator::Simple" => 0,
"List::Util" => "1.33",
- "Math::BigInt" => 0,
+ "Math::BigInt" => "1.993",
"Module::Load" => 0,
"Module::Loaded" => 0,
"POSIX" => 0,
"Symbol" => 0,
"Test::Deep" => 0,
"Test::Fatal" => 0,
- "Test::More" => 0,
+ "Test::More" => "1.001004_001",
"Test::Warnings" => 0,
"Text::ParseWords" => 0,
- "Time::Piece" => 0,
+ "Time::Piece" => "1.33",
"XML::LibXML" => 0,
"XML::LibXML::Reader" => 0,
"boolean" => 0,
VERSION
- version 0.902
+ version 0.903
SYNOPSIS
);
# Save the database to the filesystem
- $kdbx->dump_file('passwords.kdbx', 'M@st3rP@ssw0rd!');
+ $kdbx->dump_file('passwords.kdbx', 'masterpw changeme');
# Load the database from the filesystem into a new database instance
- my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'M@st3rP@ssw0rd!');
+ my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'masterpw changeme');
# Iterate over database entries, print entry titles
- $kdbx2->entries->each(sub {
- my ($entry) = @_;
+ $kdbx2->entries->each(sub($entry, @) {
say 'Entry: ', $entry->title;
});
my $kdbx = File::KDBX->load_file('mypasswords.kdbx', 'master password CHANGEME');
$kdbx->unlock; # cause $entry->password below to be defined
- $kdbx->entries->each(sub {
- my ($entry) = @_;
+ $kdbx->entries->each(sub($entry, @) {
say 'Found password for: ', $entry->title;
say ' Username: ', $entry->username;
say ' Password: ', $entry->password;
use List::Util qw(any first);
use Ref::Util qw(is_ref is_arrayref is_plain_hashref);
use Scalar::Util qw(blessed);
-use Time::Piece;
+use Time::Piece 1.33;
use boolean;
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
our $WARNINGS = 1;
fieldhashes \my (%SAFE, %KEYS);
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
);
# Save the database to the filesystem
- $kdbx->dump_file('passwords.kdbx', 'M@st3rP@ssw0rd!');
+ $kdbx->dump_file('passwords.kdbx', 'masterpw changeme');
# Load the database from the filesystem into a new database instance
- my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'M@st3rP@ssw0rd!');
+ my $kdbx2 = File::KDBX->load_file('passwords.kdbx', 'masterpw changeme');
# Iterate over database entries, print entry titles
- $kdbx2->entries->each(sub {
- my ($entry) = @_;
+ $kdbx2->entries->each(sub($entry, @) {
say 'Entry: ', $entry->title;
});
my $kdbx = File::KDBX->load_file('mypasswords.kdbx', 'master password CHANGEME');
$kdbx->unlock; # cause $entry->password below to be defined
- $kdbx->entries->each(sub {
- my ($entry) = @_;
+ $kdbx->entries->each(sub($entry, @) {
say 'Found password for: ', $entry->title;
say ' Username: ', $entry->username;
say ' Password: ', $entry->password;
use Scalar::Util qw(looks_like_number);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
my %CIPHERS;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Cipher';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
has key_size => 32;
sub iv_size { 16 }
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Cipher';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
has 'counter', is => 'ro', default => 0;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
use Scalar::Util qw(dualvar);
use namespace::clean -except => 'import';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
BEGIN {
my %CONSTANTS = (
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
=head2 :cipher
-Constants related ciphers:
+Constants related to ciphers:
=over 4
use Scalar::Util qw(looks_like_number openhandle);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub new {
=head1 VERSION
-version 0.902
+version 0.903
=head1 ATTRIBUTES
extends 'File::KDBX::Dumper';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub _write_magic_numbers { '' }
sub _write_headers { '' }
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'File::KDBX::Dumper';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub _dump {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Dumper';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub _write_headers {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 BUGS
extends 'File::KDBX::Dumper';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
has _binaries_written => {}, is => 'ro';
=head1 VERSION
-version 0.902
+version 0.903
=head1 BUGS
use File::KDBX::Util qw(:class :int erase_scoped gzip snakify);
use IO::Handle;
use Scalar::Util qw(blessed isdual looks_like_number);
-use Time::Piece;
+use Time::Piece 1.33;
use XML::LibXML;
use boolean;
use namespace::clean;
extends 'File::KDBX::Dumper';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
has allow_protection => 1;
=head1 VERSION
-version 0.902
+version 0.903
=head1 ATTRIBUTES
use Ref::Util qw(is_coderef is_hashref is_plain_hashref);
use Scalar::Util qw(blessed looks_like_number);
use Storable qw(dclone);
-use Time::Piece;
+use Time::Piece 1.33;
use boolean;
use namespace::clean;
extends 'File::KDBX::Object';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
my $PLACEHOLDER_MAX_DEPTH = 10;
my %PLACEHOLDERS;
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
use Scalar::Util qw(blessed looks_like_number);
use namespace::clean -except => 'import';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
our @EXPORT = qw(alert error throw);
=head1 VERSION
-version 0.902
+version 0.903
=head1 ATTRIBUTES
use List::Util qw(any sum0);
use Ref::Util qw(is_coderef is_ref);
use Scalar::Util qw(blessed);
-use Time::Piece;
+use Time::Piece 1.33;
use boolean;
use namespace::clean;
extends 'File::KDBX::Object';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
# has uuid => sub { generate_uuid(printable => 1) };
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'IO::Handle';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub _croak { require Carp; goto &Carp::croak }
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'File::KDBX::IO';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
our $BUFFER_SIZE = 16384;
our $ERROR;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::IO';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
our $ALGORITHM = 'SHA256';
our $BLOCK_SIZE = 1048576; # 1MiB
our $ERROR;
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'File::KDBX::IO';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
our $BLOCK_SIZE = 1048576; # 1MiB
our $ERROR;
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
BEGIN { mark_as_loaded('Iterator::Simple::Iterator') }
extends 'Iterator::Simple::Iterator';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub new {
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
A buffered iterator compatible with and expanding upon L<Iterator::Simple>, this provides an easy way to
navigate a L<File::KDBX> database. The documentation for B<Iterator::Simple> documents functions and methods
-supported but this iterator that are not documented here, so consider that additional reading.
+supported by this iterator that are not documented here, so consider that additional reading.
=head2 Buffer
=head2 where
\&iterator = $iterator->grep(\&query);
+ \&iterator = $iterator->grep(sub($item) { ... });
Get a new iterator draining from an existing iterator but providing only items that pass a test or are matched
by a query. In its basic form this method is very much like perl's built-in grep function, except for
Get a new iterator draining from an existing iterator but providing only a limited number of items.
-C<limit> as an alias for L<< Iterator::Simple/"$iterator->head($count)" >>.
+C<limit> is an alias for L<< Iterator::Simple/"$iterator->head($count)" >>.
=head2 to_array
its own ancestor -- but I'm noting it here as a potential issue if you use this iterator class for other
things (which you probably shouldn't do).
+KDBX databases are always fully-loaded into memory anyway, so there's not a significant memory cost to
+draining an iterator completely.
+
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website
use Scalar::Util qw(blessed);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
my %KDFS;
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'File::KDBX::KDF';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
# Rounds higher than this are eligible for forking:
my $FORK_OPTIMIZATION_THRESHOLD = 100_000;
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'File::KDBX::KDF';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub salt { $_[0]->{+KDF_PARAM_ARGON2_SALT} or throw 'Salt is not set' }
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
use Scalar::Util qw(blessed openhandle);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
fieldhashes \my %SAFE;
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'File::KDBX::Key';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub init {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Key';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub init {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Key';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
has 'type', is => 'ro';
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Key';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub init {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Key::ChallengeResponse';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
# It can take some time for the USB device to be ready again, so we can retry a few times.
our $RETRY_COUNT = 5;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
use Scalar::Util qw(looks_like_number openhandle);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub new {
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
use File::KDBX;
use Ref::Util qw(is_arrayref is_hashref);
use Scalar::Util qw(looks_like_number);
-use Time::Piece;
+use Time::Piece 1.33;
use boolean;
use namespace::clean;
extends 'File::KDBX::Loader';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
-my $DEFAULT_EXPIRATION = Time::Piece->new(32503677839); # 2999-12-31 23:59:59
+my $DEFAULT_EXPIRATION = Time::Piece->strptime('2999-12-31 23:59:59', '%Y-%m-%d %H:%M:%S');
sub _read_headers { '' }
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
extends 'File::KDBX::Loader';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub _read {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
extends 'File::KDBX::Loader';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub _read_header {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 BUGS
extends 'File::KDBX::Loader';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub _read_header {
my $self = shift;
=head1 VERSION
-version 0.902
+version 0.903
=head1 BUGS
use File::KDBX::Safe;
use File::KDBX::Util qw(:class :int :text gunzip erase_scoped);
use Scalar::Util qw(looks_like_number);
-use Time::Piece;
+use Time::Piece 1.33;
use XML::LibXML::Reader;
use boolean;
use namespace::clean;
extends 'File::KDBX::Loader';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
has '_reader', is => 'ro';
has '_safe', is => 'ro', default => sub { File::KDBX::Safe->new(cipher => $_[0]->kdbx->random_stream) };
my $decoded = eval { _decode_primitive($content, $type) };
if (my $err = $@) {
ref $err and $err->details(node => $reader->nodePath, line => $reader->lineNumber);
- throw $err
+ throw $err;
}
return $decoded;
$binary .= \0 x (8 - length($binary)) if length($binary) < 8;
my ($seconds_since_ad1) = unpack_Ql($binary);
my $epoch = $seconds_since_ad1 - TIME_SECONDS_AD1_TO_UNIX_EPOCH;
- return Time::Piece->new($epoch);
+ return gmtime($epoch);
}
-
my $dt = eval { Time::Piece->strptime($_, '%Y-%m-%dT%H:%M:%SZ') };
if (my $err = $@) {
throw 'Failed to parse datetime', text => $_, error => $err;
=head1 VERSION
-version 0.902
+version 0.903
=head1 BUGS
use Scalar::Util qw(blessed weaken);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
fieldhashes \my (%KDBX, %PARENT, %TXNS, %REFS, %SIGNALS);
=head1 VERSION
-version 0.902
+version 0.903
=head1 DESCRIPTION
use Scalar::Util qw(refaddr);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub new {
=head1 VERSION
-version 0.902
+version 0.903
=head1 SYNOPSIS
use File::KDBX::Util qw(:class);
use namespace::clean;
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
sub new {
=head1 VERSION
-version 0.902
+version 0.903
=head1 ATTRIBUTES
use Module::Load;
use Ref::Util qw(is_arrayref is_coderef is_hashref is_ref is_refref is_scalarref);
use Scalar::Util qw(blessed looks_like_number readonly);
-use Time::Piece;
+use Time::Piece 1.33;
use boolean;
use namespace::clean -except => 'import';
-our $VERSION = '0.902'; # VERSION
+our $VERSION = '0.903'; # VERSION
our %EXPORT_TAGS = (
assert => [qw(DEBUG assert)],
require Config;
if ($Config::Config{ivsize} < 8) {
if (blessed $num && $num->can('as_hex')) {
+ require Math::BigInt;
return "\xff\xff\xff\xff\xff\xff\xff\xff" if Math::BigInt->new('18446744073709551615') <= $num;
return "\x00\x00\x00\x00\x00\x00\x00\x80" if $num <= Math::BigInt->new('-9223372036854775808');
my $neg;
=head1 VERSION
-version 0.902
+version 0.903
=head1 FUNCTIONS
'IPC::Cmd' => '0.84',
'Iterator::Simple' => '0',
'List::Util' => '1.33',
- 'Math::BigInt' => '0',
+ 'Math::BigInt' => '1.993',
'Module::Load' => '0',
'Module::Loaded' => '0',
'POSIX' => '0',
'Storable' => '0',
'Symbol' => '0',
'Text::ParseWords' => '0',
- 'Time::Piece' => '0',
+ 'Time::Piece' => '1.33',
'XML::LibXML' => '0',
'XML::LibXML::Reader' => '0',
'boolean' => '0',
'Getopt::Std' => '0',
'IO::Handle' => '0',
'IPC::Open3' => '0',
+ 'Math::BigInt' => '1.993',
'Test::Deep' => '0',
'Test::Fatal' => '0',
- 'Test::More' => '0',
+ 'Test::More' => '1.001004_001',
'Test::Warnings' => '0',
'lib' => '0',
'utf8' => '0'
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.',
use File::KDBX;
use File::Temp qw(tempfile);
use Test::Deep;
-use Test::More;
+use Test::More 1.001004_001;
use Time::Piece;
subtest 'Create a new database' => sub {
my @objects = $copy->objects->each;
subtest 'Cloned objects refer to the cloned database' => sub {
plan tests => scalar @_;
- for my $object (@objects) {
+ for my $object (@_) {
my $object_kdbx = eval { $object->kdbx };
is $object_kdbx, $copy, 'Object: ' . $object->label;
}
use Encode qw(decode);
use File::KDBX;
use Test::Deep;
-use Test::More;
+use Test::More 1.001004_001;
eval { require File::KeePass; require File::KeePass::KDBX }
or plan skip_all => 'File::KeePass and File::KeePass::KDBX required to test KDB files';
use File::KDBX;
use File::KDBX::Constants qw(:version :kdf);
use Test::Deep;
-use Test::More;
+use Test::More 1.001004_001;
use boolean qw(:all);
subtest 'Verify Format400' => sub {
is $kdbx->minimum_version, KDBX_VERSION_4_1, 'Icon with name requires upgrade';
$kdbx->remove_custom_icon($icon_uuid);
is $kdbx->minimum_version, KDBX_VERSION_3_1, 'Reset upgrade requirement';
- $icon_uuid = $kdbx->add_custom_icon('data2', last_modification_time => gmtime);
+ $icon_uuid = $kdbx->add_custom_icon('data2', last_modification_time => scalar gmtime);
is $kdbx->minimum_version, KDBX_VERSION_4_1, 'Icon with modtime requires upgrade';
$kdbx->remove_custom_icon($icon_uuid);
is $kdbx->minimum_version, KDBX_VERSION_3_1, 'Reset upgrade requirement';
use File::KDBX::Constants qw(:key_file);
use File::KDBX::Key;
use File::Temp qw(tempfile);
-use Test::More;
+use Test::More 1.001004_001;
subtest 'Primitives' => sub {
my $pkey = File::KDBX::Key->new('password');
use POSIX ();
use Scalar::Util qw(looks_like_number);
use Scope::Guard;
-use Test::More;
+use Test::More 1.001004_001;
BEGIN {
if (!$ENV{AUTHOR_TESTING}) {
use TestCommon;
use File::KDBX::Util qw(:all);
-use Math::BigInt;
+use Math::BigInt 1.993;
use Scalar::Util qw(blessed);
use Test::More;