use Encode qw(decode);
use File::KDBX::Constants qw(:header :inner_header :variant_map :compression);
use File::KDBX::Error;
-use File::KDBX::Util qw(:io assert_64bit erase_scoped);
+use File::KDBX::Util qw(:class :io :load assert_64bit erase_scoped);
use File::KDBX::IO::Crypt;
use File::KDBX::IO::HmacBlock;
use boolean;
use namespace::clean;
-use parent 'File::KDBX::Loader';
+extends 'File::KDBX::Loader';
our $VERSION = '999.999'; # VERSION
$buf .= $val;
}
- $type = KDBX_HEADER($type);
+ $type = kdbx_header($type);
if ($type == HEADER_END) {
# done
}
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;
read_all $fh, $val, $size or throw 'Expected inner header value', type => $type, size => $size;
}
- my $dualtype = KDBX_INNER_HEADER($type);
+ my $dualtype = kdbx_inner_header($type);
if (!defined $dualtype) {
alert "Ignoring unknown inner header type ($type)", type => $type, size => $size, value => $val;