use Encode qw(encode);
use File::KDBX::Constants qw(:version :time);
use File::KDBX::Error;
-use File::KDBX::Util qw(:class assert_64bit erase_scoped gzip snakify);
+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;
format uses HMAC-SHA256 to detect tampering.
L<File::KDBX::Dumper::V3> automatically calculates the header hash an provides it to this module, and plain
-XML files which don't have a KDBX wrapper don't have headers and so should have a header hash. Therefore there
-is probably never any reason to set this manually.
+XML files which don't have a KDBX wrapper don't have headers and so should not have a header hash. Therefore
+there is probably never any reason to set this manually.
=cut
my $new_ref = keys %{$self->_binaries_written};
my $written = $self->_binaries_written;
- my $entries = $kdbx->all_entries(history => true);
- for my $entry (@$entries) {
+ my $entries = $kdbx->entries(history => 1);
+ while (my $entry = $entries->next) {
for my $key (keys %{$entry->binaries}) {
my $binary = $entry->binaries->{$key};
if (defined $binary->{ref} && defined $kdbx->binaries->{$binary->{ref}}) {
sub _encode_datetime_binary {
local $_ = shift;
- assert_64bit;
my $seconds_since_ad1 = $_ + TIME_SECONDS_AD1_TO_UNIX_EPOCH;
- my $buf = pack('Q<', $seconds_since_ad1->epoch);
+ my $buf = pack_Ql($seconds_since_ad1->epoch);
return eval { encode_b64($buf) };
}