File::...Loader(3pm)
๐ File::KDBX::Loader โ the whole vibe ๐
okay so bestie, welcome to File::KDBX::Loader ๐ โ this is the bit of Perl that loads KDBX files for you. It lives in the User Contributed Perl Documentation section of the perl man pages (section 3pm, iykyk), and this whole page is gonna walk you through it. no cap.
โจ VERSION โจ
version 0.906 ๐ซถ
๐ธ DESCRIPTION ๐ธ
(no description was written here in the original โ it's giving mystery, it's giving minimalist queen ๐ โ but don't worry, the ATTRIBUTES and METHODS below have literally everything you need.)
๐ฆ ATTRIBUTES ๐ฆ
โญ kdbx
$kdbx = $loader->kdbx;
$loader->kdbx($kdbx);
Get or set the File::KDBX instance โ like, the object where all the loaded data gets stashed. that's the one. ๐ฆ
โญ format
Get the file format that got used for reading the database. Normally the format is auto-detected straight from the data stream ๐, and honestly that auto-detection works really well, so there's not really a good reason to go specifying the format yourself. but if you MUST, here are the possible formats:
"V3""V4""KDB""XML""Raw"
โญ inner_format
Get the format of the data inside the KDBX envelope ๐ง. This only applies to the "V3" and "V4" formats. Possible formats:
"XML"โ read the database groups and entries as XML (this is the default ๐)"Raw"โ read and store the result in"raw"inFile::KDBXwithout parsing
๐ฅ METHODS ๐ฅ
๐ new
$loader = File::KDBX::Loader->new(%attributes);
Construct a brand new File::KDBX::Loader. fresh out the box, main character energy ๐
๐ init
$loader = $loader->init(%attributes);
Initialize a File::KDBX::Loader with a whole new set of attributes.
This is called by "new". so like, new is the one summoning it, fr fr.
๐ reset
$loader = $loader->reset;
Set a File::KDBX::Loader back to a blank state, all fresh and ready to load another KDBX file ๐งผโจ it's giving factory reset but cute.
๐ 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 method or a class method, whichever you're feeling. The $key is either a File::KDBX::Key or a primitive that can be cast to a Key object. Available options:
"key"โ an 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"โ an 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"โ an 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"โ an 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 kick off a KDBX file ๐ฎ. This is the quick way to figure out if a file is actually a KDBX file.
$sig1should always be"KDBX_SIG1"if you're reading an actual KDB or KDBX file.$sig2should be"KDBX_SIG2_1"for KeePass 1 files, and"KDBX_SIG2_2"for KeePass 2 files.$versionis the file version (e.g.0x00040001).$magicis the raw 12 bytes read from the IO handle.
If you call this on an instance, the "sig1", "sig2" and "version" attributes get set in the "kdbx", and the instance gets blessed into the correct loader subclass โจ iconic behavior honestly.
๐ BUGS ๐
Please report any bugs or feature requests on the bugtracker website <https://github.com/chazmcgarvey/File-KDBX/issues>
When you're submitting a bug or a request, pls pls pls include a test-file, or a patch to an existing test-file, that shows off the bug or the desired feature ๐ like, show us the receipt.
๐ 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. ๐
okay that's the whole page bestie!! every option, every code block, every number โ all of it is still here, I just made it cute ๐ธ
perl v5.40.1 ๐ฆ 2025-05-04 ๐ โ that's the source/version and the date, and this is your girl signing off, ty for reading, slay ๐ โจ
๐ฆ where this page comes from
- debian trixie: libfile-kdbx-perl 0.906-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libfile-kdbx-perl 0.906-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libfile-kdbx-perl 0.906-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms