1File::KDBX::Loader(3) User Contributed Perl DocumentationFile::KDBX::Loader(3)
2
3
4
6 File::KDBX::Loader - Load KDBX files
7
9 version 0.906
10
13 kdbx
14 $kdbx = $loader->kdbx;
15 $loader->kdbx($kdbx);
16
17 Get or set the File::KDBX instance for storing the loaded data into.
18
19 format
20 Get the file format used for reading the database. Normally the format
21 is auto-detected from the data stream. This auto-detection works well,
22 so there's not really a good reason to explicitly specify the format.
23 Possible formats:
24
25 • "V3"
26
27 • "V4"
28
29 • "KDB"
30
31 • "XML"
32
33 • "Raw"
34
35 inner_format
36 Get the format of the data inside the KDBX envelope. This only applies
37 to "V3" and "V4" formats. Possible formats:
38
39 • "XML" - Read the database groups and entries as XML (default)
40
41 • "Raw" - Read and store the result in "raw" in File::KDBX without
42 parsing
43
45 new
46 $loader = File::KDBX::Loader->new(%attributes);
47
48 Construct a new File::KDBX::Loader.
49
50 init
51 $loader = $loader->init(%attributes);
52
53 Initialize a File::KDBX::Loader with a new set of attributes.
54
55 This is called by "new".
56
57 reset
58 $loader = $loader->reset;
59
60 Set a File::KDBX::Loader to a blank state, ready to load another KDBX
61 file.
62
63 load
64 $kdbx = File::KDBX::Loader->load(\$string, %options);
65 $kdbx = File::KDBX::Loader->load(\$string, $key);
66 $kdbx = File::KDBX::Loader->load(*IO, %options);
67 $kdbx = File::KDBX::Loader->load(*IO, $key);
68 $kdbx = File::KDBX::Loader->load($filepath, %options);
69 $kdbx = File::KDBX::Loader->load($filepath, $key);
70
71 Load a KDBX file. This works as an instance or a class method. The $key
72 is either a File::KDBX::Key or a primitive castable to a Key object.
73 Available options:
74
75 • "key" - Alternative way to specify $key
76
77 load_string
78 $kdbx = File::KDBX::Loader->load_string($string, %options);
79 $kdbx = File::KDBX::Loader->load_string($string, $key);
80 $kdbx = File::KDBX::Loader->load_string(\$string, %options);
81 $kdbx = File::KDBX::Loader->load_string(\$string, $key);
82
83 Load a KDBX file from a string / memory buffer. This works as an
84 instance or class method. Available options:
85
86 • "key" - Alternative way to specify $key
87
88 load_file
89 $kdbx = File::KDBX::Loader->load_file($filepath, %options);
90 $kdbx = File::KDBX::Loader->load_file($filepath, $key);
91
92 Read a KDBX file from a filesystem. This works as an instance or class
93 method. Available options:
94
95 • "key" - Alternative way to specify $key
96
97 load_handle
98 $kdbx = File::KDBX::Loader->load_handle($fh, %options);
99 $kdbx = File::KDBX::Loader->load_handle($fh, $key);
100 $kdbx = File::KDBX::Loader->load_handle(*IO, %options);
101 $kdbx = File::KDBX::Loader->load_handle(*IO, $key);
102
103 Read a KDBX file from an input stream / file handle. This works as an
104 instance or class method. Available options:
105
106 • "key" - Alternative way to specify $key
107
108 read_magic_numbers
109 $magic = File::KDBX::Loader->read_magic_numbers($fh);
110 ($sig1, $sig2, $version, $magic) = File::KDBX::Loader->read_magic_numbers($fh);
111
112 $magic = $loader->read_magic_numbers($fh);
113 ($sig1, $sig2, $version, $magic) = $loader->read_magic_numbers($fh);
114
115 Read exactly 12 bytes from an IO handle and parse them into the three
116 magic numbers that begin a KDBX file. This is a quick way to determine
117 if a file is actually a KDBX file.
118
119 $sig1 should always be "KDBX_SIG1" if reading an actual KDB or KDBX
120 file.
121
122 $sig2 should be "KDBX_SIG2_1" for KeePass 1 files and "KDBX_SIG2_2" for
123 KeePass 2 files.
124
125 $version is the file version (e.g. 0x00040001).
126
127 $magic is the raw 12 bytes read from the IO handle.
128
129 If called on an instance, the "sig1", "sig2" and "version" attributes
130 will be set in the "kdbx" and the instance will be blessed into the
131 correct loader subclass.
132
134 Please report any bugs or feature requests on the bugtracker website
135 <https://github.com/chazmcgarvey/File-KDBX/issues>
136
137 When submitting a bug or request, please include a test-file or a patch
138 to an existing test-file that illustrates the bug or desired feature.
139
141 Charles McGarvey <ccm@cpan.org>
142
144 This software is copyright (c) 2022 by Charles McGarvey.
145
146 This is free software; you can redistribute it and/or modify it under
147 the same terms as the Perl 5 programming language system itself.
148
149
150
151perl v5.36.1 2023-09-27 File::KDBX::Loader(3)