use File::KDBX::Error;
use File::KDBX::IO::Crypt;
use File::KDBX::IO::HashBlock;
-use File::KDBX::Util qw(:io assert_64bit erase_scoped);
+use File::KDBX::Util qw(:class :int :io :load erase_scoped);
use namespace::clean;
-use parent 'File::KDBX::Loader';
+extends 'File::KDBX::Loader';
our $VERSION = '999.999'; # VERSION
$buf .= $val;
}
- $type = KDBX_HEADER($type);
+ $type = to_header_constant($type);
if ($type == HEADER_END) {
# done
}
# nothing
}
elsif ($type == HEADER_TRANSFORM_ROUNDS) {
- assert_64bit;
- $val = unpack('Q<', $val);
+ ($val) = unpack_Ql($val);
}
elsif ($type == HEADER_ENCRYPTION_IV) {
# nothing
# nothing
}
elsif ($type == HEADER_INNER_RANDOM_STREAM_ID) {
- $val = unpack('L<', $val);
+ ($val) = unpack('L<', $val);
}
elsif ($type == HEADER_KDF_PARAMETERS ||
$type == HEADER_PUBLIC_CUSTOM_DATA) {
my $compress = $kdbx->headers->{+HEADER_COMPRESSION_FLAGS};
if ($compress == COMPRESSION_GZIP) {
- require IO::Uncompress::Gunzip;
+ load_optional('IO::Uncompress::Gunzip');
$fh = IO::Uncompress::Gunzip->new($fh)
or throw "Failed to initialize compression library: $IO::Uncompress::Gunzip::GunzipError",
error => $IO::Uncompress::Gunzip::GunzipError;