File::...shBlock(3pm)

πŸ“¦
version 0.906 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– File::KDBX::IO::HashBlock β€” a Perl module manual page, bestie πŸ’–

okay so this is a page from the User Contributed Perl Documentation set, and the module is File::KDBX::IO::HashBlock. It's the hash block stream IO handle. very demure, very mindful, very integrity-preserving. πŸ¦‹

✨ VERSION ✨

version 0.906 β€” yeah she's on 0.906, keep up πŸ’…


🌸 NAME 🌸

File::KDBX::IO::HashBlock β€” Hash block stream IO handle. that's it, that's the name, it's giving exactly what it says on the tin πŸŽ€


🌈 DESCRIPTION 🌈

okay bestie sit down because this is actually so cool.

When you write to a hash-block handle, it transforms the data into a whole series of blocks. each block gets hashed, and that hash gets included right there with the block in the stream. like the block brought its own receipt. iconic behavior honestly. 🧾✨

When you read from a handle, each hash block gets verified as the blocks are disassembled back into a data stream. so if something got messed with? you'll know. no cap.

This whole format exists to help ensure data integrity of KDBX3 files. periodt. πŸ’―

Each block is encoded like this:

  • Block index β€” little-endian unsigned 32-bit integer, increments starting with 0
  • Hash β€” 32 bytes
  • Block size β€” little-endian unsigned 32-bit (counting only the data)
  • Data β€” string of bytes

And the terminating block? it's an empty block where the hash is 32 null bytes, the block size is 0, and there is no data. the lil goodbye block. so minimal. so final. 🫢


πŸŽ€ ATTRIBUTES πŸŽ€

πŸ’œ algorithm

The digest algorithm used when hash-blocking the stream. default is "SHA-256". she's secure, she's classic, she ate. πŸ”₯

πŸ’œ block_size

The desired block size when writing. default is $File::KDBX::IO::HashBlock::BLOCK_SIZE, or if that's not set, 1,048,576 bytes. a whole megabyte per block, main character energy fr fr. πŸ‘‘


✨ METHODS ✨

🌟 new

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

Construct a brand new hash-block stream IO handle. yes you can pass an $fh and yes you can pass %attributes, choose your own adventure bestie. πŸ¦‹


πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests on the bugtracker website <https://github.com/chazmcgarvey/File-KDBX/issues>

not me asking you to file bugs, but like, please do, I want to fix them πŸ™ˆ

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. receipts or it didn't happen, babe β€” a test file literally shows the problem, that's the whole vibe. 🧚


πŸ‘‘ AUTHOR πŸ‘‘

Charles McGarvey <ccm@cpan.org> β€” the icon, the legend, the one who wrote this. 🌟


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 as in go off, do your thing, just keep the same terms. 🫢


and that's a wrap, bestie πŸŽ€ this lil page came to you from perl v5.40.1, dated 2025-05-04, and it says File::...shBlock(3pm) up at the top even though the real name is File::KDBX::IO::HashBlock β€” the header truncates it, not me, I would never πŸ’… mwah, go read some more manpages, ily ⭐🌸

πŸ“¦ where this page comes from