File::...Stream(3pm)
๐ File::KDBX::Cipher::Stream โ the whole vibe ๐
okay so bestie, you found it: this is the manual page for File::KDBX::Cipher::Stream, straight outta the User Contributed Perl Documentation, and the page itself gets filed under the lil' abbreviated name File::...Stream(3pm) (she's got a long government name, it's fine). grab a snack, we're doing stream ciphers ๐ฆ
โจ VERSION โจ
version 0.906 โ yes she's got a version, she's official, slay ๐
๐ธ SYNOPSIS ๐ธ
the whole personality in four lines, no cap:
use File::KDBX::Cipher::Stream;
my $cipher = File::KDBX::Cipher::Stream->new(algorithm => $algorithm, key => $key, iv => $iv);
literally that's it. build her, then she's ready ๐
๐ซถ DESCRIPTION ๐ซถ
so File::KDBX::Cipher::Stream is a subclass of File::KDBX::Cipher, and what she does โ her entire job, her main character moment โ is encrypting and decrypting data using a stream cipher. that's the assignment and she ate, fr fr ๐ฅ
๐ ATTRIBUTES ๐
counter
$counter = $cipher->counter;
get the initial counter / block count into the keystream ๐งฎ like, where in the keystream she's starting from, block-wise.
offset
$offset = $cipher->offset;
get the initial byte offset into the keystream ๐ one byte at a time, precise lil' thing.
real talk tho: this one has precedence over "counter" if both are set. so if you set both?? offset wins, periodt. no drama, just rules. ๐
๐ METHODS ๐
crypt
$ciphertext = $cipher->crypt($plaintext);
$plaintext = $cipher->crypt($ciphertext);
encrypt or decrypt some data ๐ซง and here's the iconic part: these ciphers are symmetric, so encryption and decryption are literally the same operation. you hand her plaintext, you get ciphertext. you hand her ciphertext, you get plaintext. she's ambidextrous, she doesn't care, she's just that girl ๐
oh and also? this method is an alias for both "encrypt" in File::KDBX::Cipher and "decrypt" in File::KDBX::Cipher. two names, one function, we love a versatile queen ๐
keystream
$stream = $cipher->keystream;
access the keystream ๐ the actual stream of bytes doing the work. peek at it, it's right there, it's not shy.
dup
$cipher_copy = $cipher->dup(%attributes);
get a copy of an existing cipher โ except with the counter reset ๐ โ and optionally slap some new attributes on while you're at it (%attributes, look at her being flexible). a lil' clone with amnesia about the counter. iconic behavior honestly ๐ง
๐ญ BUGS ๐ญ
bestie. if something's broken, please don't suffer in silence.
- report any bugs or feature requests on the bugtracker website: <https://github.com/chazmcgarvey/File-KDBX/issues>
and when you submit a bug or a request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature ๐ like, show us the receipts, we cannot debug a vibe alone.
๐ AUTHOR ๐
Charles McGarvey <ccm@cpan.org> โ the legend, the author, we stan. ๐
๐ 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. โจ (free software, free as in go off, fr fr)
aaaand that's the whole page, we're done here ๐ this was perl v5.40.1, dated 2025-05-04, and it's the File::...Stream(3pm) page โ bye bestie, encrypt responsibly, mwah ๐
๐ฆ 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