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, %options);
$kdbx = File::KDBX::Loader->load(\$string, $key);
$kdbx = File::KDBX::Loader->load(*IO, %options);
$kdbx = File::KDBX::Loader->load(*IO, $key);
$kdbx = File::KDBX::Loader->load($filepath, %options);
$kdbx = File::KDBX::Loader->load($filepath, $key);
Load a KDBX file. This works as an instance or a class method. The $key is either a File::KDBX::Key or a
primitive castable to a Key object. Available options:
• "key" - Alternative way to specify $key
load_string
$kdbx = File::KDBX::Loader->load_string($string, %options);
$kdbx = File::KDBX::Loader->load_string($string, $key);
$kdbx = File::KDBX::Loader->load_string(\$string, %options);
$kdbx = File::KDBX::Loader->load_string(\$string, $key);
Load a KDBX file from a string / memory buffer. This works as an instance or class method. Available
options:
• "key" - Alternative way to specify $key
load_file
$kdbx = File::KDBX::Loader->load_file($filepath, %options);
$kdbx = File::KDBX::Loader->load_file($filepath, $key);
Read a KDBX file from a filesystem. This works as an instance or class method. Available options:
• "key" - Alternative way to specify $key
load_handle
$kdbx = File::KDBX::Loader->load_handle($fh, %options);
$kdbx = File::KDBX::Loader->load_handle($fh, $key);
$kdbx = File::KDBX::Loader->load_handle(*IO, %options);
$kdbx = File::KDBX::Loader->load_handle(*IO, $key);
Read a KDBX file from an input stream / file handle. This works as an instance or class method. Available
options:
• "key" - Alternative way to specify $key
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.