BOTAN(3em)
πΈ NAME πΈ
Okay bestie, welcome to BOTAN(3em) β this is the manual page for botan, aka the Botan bindings for Emilua. Itβs giving βI know my hash functions and Iβm gonna make it cuteβ π
β¨
β¨ SYNOPSIS β¨
local hash_function = require "botan".hash_function
π«Ά FUNCTIONS π«Ά
create(algo_spec: string[, provider: string]) β hash_function|nil
Returns a newly allocated hash function object, or nil if algo_spec is not recognized. The optional provider: string is right there in the signature too, bestie π¦
create_or_throw(algo_spec: string[, provider: string]) β hash_function
Like create, except that it will throw an exception instead of returning nil. So if you want drama when it fails, this is your girl ππ₯
providers(algo_spec: string) β string[]
Returns the list of available providers for this algorithm, empty if not available. Literally an empty list if itβs not available β no cap πΈ
update(self, input: byte_span|string)
Updates the computation with input. Feed it the data, bestie π
final(self)
function final(self, out: byte_span) (1)
function final(self) -> secure_byte_span (2)
- Place the result into
out. Exactlyoutput_lengthbytes will be written. - Returns the result in a newly allocated
secure_byte_span.
Finalize the calculation. After you call final, the algorithm is reset to its initial state, so it may be reused immediately. Reusable queen behavior πβ¨
process(self, input: byte_span|string) β secure_byte_span
Equivalent to calling update followed by final. One-stop shop, no extra steps π
new_object(self) β hash_function
Return a newly allocated HashFunction object of the same type as this one.
copy_state(self) β hash_function
Return a newly allocated HashFunction object of the same type as this one, whose internal state matches the current state of this. Itβs giving clone-but-make-it-accurate π
clear(self)
Reset the state. Clean slate, fresh vibe, periodt π
π PROPERTIES π
output_length: integerβ The size (in bytes) of the output of this function.name: stringβ The hash function name.provider: stringβ Provider information about this implementation. Default is"base", might also return"sse2","avx2","openssl", or some other arbitrary string.hash_block_size: integerβ Hash block size as defined for this algorithm.
And thatβs the whole iconic page, bestie π β it comes from Emilua 0.12.1, dated 1980-01-01, and itβs the BOTAN(3em) manual. Bye fr fr πβ¨
π¦ where this page comes from
- nixos 26.05: emilua-botan 1.2.1
- nixpkgs unstable: emilua-botan 1.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms