HASH(3lua)
π HASH(3lua) β like, the Lua cryptographic hash module, bestie
okay so this is a page from the LOCAL manual, and it's about the hash module. Sit down, hydrate, and let's get into it π
β¨ NAME β¨
new, update, digest, hexdigest β the Lua Cryptographic hash module, bestie. That's the whole vibe check.
πΈ DESCRIPTION πΈ
The built-in cryptographic hashing Lua bindings β for theβ¦ yeah, the original sentence literally just trails off there, no cap, the word is missing β are available via the hash table. π«Ά
π Supported Hashing Schemes π
The following hashing schemes are supported by the hash module, and here's the full list (it's short, she's lowkey minimal):
sha256
π¦ APIs Supported π¦
These are the functions and fields you get, okurrr:
new(data)β computes a digest based on the data. Fresh start energy.update() dataβ takes the current digest and processes data to compute a new digest, as if all the prior data had been concatenated together. It's giving "and another one" πdigest()β returns the hashed digest as a binary array. Heads up: this resets the context. πhexdigest()β takesdigest()and converts it to an upper case hex string. Also resets the context, so don't say I didn't warn you π«Άdigest_sizeβ returns the size of the digest, in bytes.block_sizeβ returns the block size used, in bytes.
not the "this resets the context" jump scare twice in a row π note it, remember it, live by it.
β EXAMPLES β
bestieβ¦ there are literally no examples here. The section exists, the section is empty, and honestly? She said "figure it out" and left. Iconic. π
π SEE ALSO π
sha256(3)β go read that one too, iykyk.
π AUTHORS π
The new man page was written by Warner Losh <imp@FreeBSD.org>. Shoutout to Warner, main character of documentation π«Άβ¨
and that's the whole page, bestie β no crumbs left behind π
sign-off szn: this gorgeous thing came from Debian, dated February 6, 2024, and it's page HASH(3lua) from the LOCAL manual. mwah π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2024 Netflix, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms