spum_hash_pad_len(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ spum_hash_pad_len(9) ✨

okay bestie, welcome to the spum_hash_pad_len(9) page πŸ’… this is from the Kernel API Manual, and it's literally the glow-up guide for hash padding lengths. it's giving "small function, big responsibilities" ngl 🫢


🌸 NAME 🌸

spum_hash_pad_len β€” calculates the length of hash padding you need to stretch your data out to a full block size ✨ like, it's the function that does the math so your data fits perfectly in the block, no awkward leftovers, periodt.


πŸŽ€ SYNOPSIS πŸŽ€

u16 spum_hash_pad_len (enum hash_alg hash_alg , enum hash_mode hash_mode
, u32 chunksize , u16 hash_block_size );

that's the whole vibe right there β€” four arguments, one u16 coming back out πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hash_alg β€” the hash algorithm, iykyk 🧚
  • hash_mode β€” the hash mode, very much its own thing
  • chunksize β€” the length of your data, measured in bytes 🌸
  • hash_block_size β€” the size of one block of data for that hash algorithm ✨

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea β˜• this function reserves space for 1 byte (0x80) β€” that's the start of the pad β€” plus the total length, stored as a u64. that's it, that's the whole job, and it ate πŸ’…


πŸ‘‘ RETURN πŸ‘‘

the length of the hash pad, in bytes πŸ’– that's the number you get back, no cap.


🌈 SEE ALSO 🌈

all the other icons in the family, fr fr πŸ”₯ and yes, they live in the kernel file ./drivers/crypto/bcm/spu.c:


and that's the whole page, bestie 🫢 this iconic little entry lives in ./drivers/crypto/bcm and it's dated October 2026 β€” the spum_hash_pad_len(9) manual, signed, sealed, slayed πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from