fsverity_get_hash_alg(9)
π fsverity_get_hash_alg(9) β the Kernel API Manual, bestie edition β¨
okay so real talk, this is a page from the Kernel API Manual, and it's about one tiny little function that just... looks up a hash algorithm by its number. that's it. that's the whole vibe. but we're gonna do it properly bc precision is cute π
π NAME π
fsverity_get_hash_alg β get a hash algorithm by number
like, you give it a number, it gives you the alg. iconic matching service behavior fr fr π
π¦ SYNOPSIS π¦
const struct fsverity_hash_alg * fsverity_get_hash_alg (const struct
inode *inode , unsigned int num );
look at that signature. so clean. so main character. the return type is a const struct fsverity_hash_alg * and honestly? the const is doing the lord's work π«Ά
πΈ ARGUMENTS πΈ
inodeβ an optional inode, and it's literally only there for logging purposes. that's it. no cap, it's just so the kernel can be like "hey, this happened over here" in the logs. you can pass nothing useful and it still slays β¨numβ the hash algorithm number. the digits. the whole point. this is what gets matched up π
β DESCRIPTION β
Get the struct fsverity_hash_alg for the given hash algorithm number.
that's the entire plot. you hand over a number, it hands you back the corresponding struct fsverity_hash_alg. it's giving vending machine but make it kernel π
π₯ RETURN π₯
pointer to the hash alg if it's known, otherwise NULL.
so like, it either ate and gave you the pointer, or it hit you with the NULL and you gotta deal with it π always check, bestie. always check.
π SEE ALSO π
- Kernel file
./fs/verity/hash_algs.c fsverity_prepare_hash_state(9)fsverity_hash_block(9)fsverity_hash_buffer(9)
go read those next, iykyk π the whole little friend group lives over in ./fs/verity and they're all lowkey obsessed with each other.
ok that's the page!! it's short, it's sweet, it does exactly one thing and does it well. highkey respect π§
mwah π bye bestie!! this lil page came from ./fs/verity, dated October 2026 β go forth and look up your hash algorithms responsibly πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms