File-KeePass-KDBX

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


        @tests = $k->finder_tests(\%query);

    This is the query engine used to find groups and entries.

    See "finder_tests" in File::KeePass.

 now

        $string = $k->now;

    Get a timestamp representing the current date and time.

 is_locked

        $bool = $k->is_locked;

    Get whether or not a database is locked (i.e. memory-protected
    passwords).

    See "is_locked" in File::KeePass.

 lock

        $k->lock;

    Lock a database.

    See "lock" in File::KeePass.

 unlock

        $k->unlock;

    Unlock a database.

    See "unlock" in File::KeePass.

 locked_entry_password

        $password = $k->locked_entry_password($entry);

    Get a memory-protected password.

    See "locked_entry_password" in File::KeePass.

CAVEATS

    This shim uses perltie magics. Some data structures look and act like
    regular hashes and arrays (mostly), but you might notice some
    unexpected magical things happen, like hash fields that populate
    themselves. The magic is only there to make matching the File::KeePass
    interface possible, since that interface assumes some amount of
    interaction with unblessed data structures. Some effort was made to at
    least hide the magic where reasonable; any magical behavior is
    incidental and not considered a feature.

    You should expect some considerable overhead which makes this module
    generally slower than using either File::KeePass or File::KDBX
    directly. In some cases this might be due to an inefficient
    implementation in the shim, but largely it is the cost of transparent
    compatibility.

    If performance is critical and you still don't want to rewrite your
    code to use File::KDBX directly but do want to take advantage of some
    of the new stuff, there is also the option to go part way. The strategy
    here is to use File::KeePass::KDBX to load a database and then
    immediately convert it to a File::KeePass object. Use that object
    without any runtime overhead, and then if and when you're ready to save
    the database or use any other File::KDBX feature, "upgrade" it back
    into a File::KeePass::KDBX object. This strategy would require modest
    code modifications to your application, to change:

        my $k = File::KeePass->new('database.kdbx', 'masterpw');

    to this:

        my $k = File::KeePass::KDBX->load_db('database.kdbx', 'masterpw')->to_fkp;
        # $k is a normal File::KeePass

    and change:

        $k->save_db('database.kdbx', 'masterpw');

    to this:

        File::KeePass::KDBX->from_fkp($k)->save_db('database.kdbx', 'masterpw');

    This works because File::KeePass::KDBX provides methods "to_fkp" and
    "from_fkp" for converting to and from File::KeePass. "new" also works
    instead of "from_fkp".

 Discrepancies

    This shim is supposed to be a drop-in replacement for File::KeePass. If
    you're sticking to the File::KeePass public interface you probably
    won't have to rewrite any code. If you do, it could be considered a
    File::KeePass::KDBX bug. But there are some differences that some code
    might notice and could even get tripped up on:

    File::KeePass::KDBX does not provide any of the "UTILITY METHODS" in
    File::KeePass or "OTHER METHODS" in File::KeePass unless incidentally,
    with two exceptions: "now" and "default_exp". I judge these other
    methods to not be useful for users of File::KeePass and so probably
    aren't used by anyone, but if I'm wrong you can get them by using
    File::KeePass:

        use File::KeePass;  # must use before File::KeePass::KDBX
        use File::KeePass::KDBX;

    Using both File::KeePass and File::KeePass::KDBX in this order will
    make the latter a proper subclass of the former, so all the utility
    methods will be available via inheritance. You might also need to do
    this if the answer to File::KeePass::KDBX->new->isa('File::KeePass') is
    important to your code.

    File::KeePass::KDBX does not take any pains to replicate File::KeePass
    bugs <https://rt.cpan.org/Public/Dist/Display.html?Name=File-KeePass>.
    If your code has any workarounds, you might need or want to undo those.
    The issues known to be fixed (or not applicable) by using
    File::KeePass::KDBX are: #85012



( run in 0.630 second using v1.01-cache-2.11-cpan-39bf76dae61 )