use File::KDBX::Error;
use File::KDBX::IO::Crypt;
use File::KDBX::IO::HashBlock;
-use File::KDBX::Util qw(:class :empty :load assert_64bit erase_scoped);
+use File::KDBX::Util qw(:class :empty :int :load erase_scoped);
use IO::Handle;
use namespace::clean;
my $type = shift;
my $val = shift // '';
- $type = kdbx_header($type);
+ $type = to_header_constant($type);
if ($type == HEADER_END) {
$val = "\r\n\r\n";
}
# nothing
}
elsif ($type == HEADER_TRANSFORM_ROUNDS) {
- assert_64bit;
- $val = pack('Q<', $val);
+ $val = pack_Ql($val);
}
elsif ($type == HEADER_ENCRYPTION_IV) {
# nothing
$fh->print($kdbx->headers->{+HEADER_STREAM_START_BYTES})
or throw 'Failed to write start bytes';
- $fh->flush;
$kdbx->key($key);