NAME
File::KDBX::Loader - Load KDBX files
VERSION
version 0.800
DESCRIPTION
ATTRIBUTES
kdbx
$kdbx = $loader->kdbx;
$loader->kdbx($kdbx);
Get or set the File::KDBX instance for storing the loaded data into.
format
Get the file format used for reading the database. Normally the format is auto-detected from the data stream. This auto-detection works well, so there's not really a good reason to explicitly specify the format. Possible formats:
V3V4KDBXMLRaw
inner_format
Get the format of the data inside the KDBX envelope. This only applies to V3 and V4 formats. Possible formats:
XML- Read the database groups and entries as XML (default)Raw- Read parsing and store the result in "raw" in File::KDBX
METHODS
new
$loader = File::KDBX::Loader->new(%attributes);
Construct a new File::KDBX::Loader.
init
$loader = $loader->init(%attributes);
Initialize a File::KDBX::Loader with a new set of attributes.
This is called by "new".
reset
$loader = $loader->reset;
Set a File::KDBX::Loader to a blank state, ready to load another KDBX file.
load
$kdbx = File::KDBX::Loader->load(\$string, $key);
$kdbx = File::KDBX::Loader->load(*IO, $key);
$kdbx = File::KDBX::Loader->load($filepath, $key);
$kdbx = $loader->load(...); # also instance method
Load a KDBX file.
The $key is either a File::KDBX::Key or a primitive that can be converted to a Key object.
load_string
$kdbx = File::KDBX::Loader->load_string($string, $key);
$kdbx = File::KDBX::Loader->load_string(\$string, $key);
$kdbx = $loader->load_string(...); # also instance method
Load a KDBX file from a string / memory buffer.
load_file
$kdbx = File::KDBX::Loader->load_file($filepath, $key);
$kdbx = $loader->load_file(...); # also instance method
Read a KDBX file from a filesystem.
load_handle
$kdbx = File::KDBX::Loader->load_handle($fh, $key);
$kdbx = File::KDBX::Loader->load_handle(*IO, $key);
$kdbx->load_handle(...); # also instance method
Read a KDBX file from an input stream / file handle.
min_version
$min_version = File::KDBX::Loader->min_version;
Get the minimum KDBX file version supported, which is 3.0 or 0x00030000 as it is encoded.
To read older KDBX files unsupported by this module, try File::KeePass.
read_magic_numbers
$magic = File::KDBX::Loader->read_magic_numbers($fh);
($sig1, $sig2, $version, $magic) = File::KDBX::Loader->read_magic_numbers($fh);
$magic = $loader->read_magic_numbers($fh);
($sig1, $sig2, $version, $magic) = $loader->read_magic_numbers($fh);
Read exactly 12 bytes from an IO handle and parse them into the three magic numbers that begin a KDBX file. This is a quick way to determine if a file is actually a KDBX file.
$sig1 should always be KDBX_SIG1 if reading an actual KDB or KDBX file.
$sig2 should be KDBX_SIG2_1 for KeePass 1 files and KDBX_SIG2_2 for KeePass 2 files.
$version is the file version (e.g. 0x00040001).
$magic is the raw 12 bytes read from the IO handle.
If called on an instance, the sig1, sig2 and version attributes will be set in the "kdbx" and the instance will be blessed into the correct loader subclass.
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/File-KDBX/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHOR
Charles McGarvey <ccm@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by Charles McGarvey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.