]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/Loader/V3.pm
Add support for 32-bit perls
[chaz/p5-File-KDBX] / lib / File / KDBX / Loader / V3.pm
index 4b89fe97792f2c23617e7a7483a80f11d90818c6..cf69ae65bdf36dc4505aee1b385ae23726a2df1a 100644 (file)
@@ -22,7 +22,7 @@ use File::KDBX::Constants qw(:header :compression :kdf);
 use File::KDBX::Error;
 use File::KDBX::IO::Crypt;
 use File::KDBX::IO::HashBlock;
-use File::KDBX::Util qw(:class :io :load assert_64bit erase_scoped);
+use File::KDBX::Util qw(:class :int :io :load erase_scoped);
 use namespace::clean;
 
 extends 'File::KDBX::Loader';
@@ -42,7 +42,7 @@ sub _read_header {
         $buf .= $val;
     }
 
-    $type = kdbx_header($type);
+    $type = to_header_constant($type);
     if ($type == HEADER_END) {
         # done
     }
@@ -62,8 +62,7 @@ sub _read_header {
         # nothing
     }
     elsif ($type == HEADER_TRANSFORM_ROUNDS) {
-        assert_64bit;
-        $val = unpack('Q<', $val);
+        ($val) = unpack_Ql($val);
     }
     elsif ($type == HEADER_ENCRYPTION_IV) {
         # nothing
@@ -75,7 +74,7 @@ sub _read_header {
         # 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) {
This page took 0.021221 seconds and 4 git commands to generate.