logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

File::KDBX::IO::Crypt - Encrypter/decrypter IO handle

Attributes

cipher
       A File::KDBX::Cipher instance to do the actual encryption or decryption.

Author

       Charles McGarvey <ccm@cpan.org>

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.

Methods

new
           $fh = File::KDBX::IO::Crypt->new(%attributes);
           $fh = File::KDBX::IO::Crypt->new($fh, %attributes);

       Construct a new crypto IO handle.

Name

       File::KDBX::IO::Crypt - Encrypter/decrypter IO handle

Synopsis

           use File::KDBX::IO::Crypt;
           use File::KDBX::Cipher;

           my $cipher = File::KDBX::Cipher->new(...);

           open(my $out_fh, '>:raw', 'ciphertext.bin');
           $out_fh = File::KDBX::IO::Crypt->new($out_fh, cipher => $cipher);

           print $out_fh $plaintext;

           close($out_fh);

           open(my $in_fh, '<:raw', 'ciphertext.bin');
           $in_fh = File::KDBX::IO::Crypt->new($in_fh, cipher => $cipher);

           my $plaintext = do { local $/; <$in_fh> );

           close($in_fh);

Version

       version 0.906

See Also