]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/Dumper/KDB.pm
Prereq CryptX 0.049 for encode_b32*
[chaz/p5-File-KDBX] / lib / File / KDBX / Dumper / KDB.pm
index b1d5ba7d4a49f9e18c8b2be9cb2fd41b5df2b68c..ff6df94542c22d87c4fc59d58133577dddc40b45 100644 (file)
@@ -9,10 +9,10 @@ use Encode qw(encode);
 use File::KDBX::Constants qw(:magic);
 use File::KDBX::Error;
 use File::KDBX::Loader::KDB;
-use File::KDBX::Util qw(:uuid load_optional);
+use File::KDBX::Util qw(:class :uuid load_optional);
 use namespace::clean;
 
-use parent 'File::KDBX::Dumper';
+extends 'File::KDBX::Dumper';
 
 our $VERSION = '999.999'; # VERSION
 
@@ -29,8 +29,6 @@ sub _write_body {
     my $k = File::KeePass::KDBX->new($self->kdbx)->to_fkp;
     $self->_write_custom_icons($self->kdbx, $k);
 
-    # TODO create a KPX_CUSTOM_ICONS_4 meta stream. FKP itself handles KPX_GROUP_TREE_STATE
-
     substr($k->header->{seed_rand}, 16) = '';
 
     $key = $self->kdbx->composite_key($key, keep_primitive => 1);
@@ -64,8 +62,8 @@ sub _write_custom_icons {
     my %groups;     # id -> index
     my %gid;
 
-    for my $uuid (sort keys %{$kdbx->custom_icons}) {
-        my $icon = $kdbx->custom_icons->{$uuid};
+    for my $icon (@{$kdbx->custom_icons}) {
+        my $uuid = $icon->{uuid};
         my $data = $icon->{data} or next;
         push @icons, $data;
         $icons{$uuid} = $#icons;
This page took 0.021408 seconds and 4 git commands to generate.