shishi_hmac_sha1(3)
π shishi_hmac_sha1 β the manual page, but make it cute π
okay bestie, pull up a chair because we're about to talk about the shishi_hmac_sha1 API function, from the shishi manual, section 3. yes it's a crypto thing. yes it's iconic. let's go π«Ά
β¨ NAME β¨
shishi_hmac_sha1 β it's an API function, bestie. that's the whole vibe.
πΈ SYNOPSIS πΈ
first things first, you gotta include the header or nothing works, periodt:
#include <shishi.h>
int shishi_hmac_sha1(Shishi * handle, const char * key, size_t keylen,
const char * in, size_t inlen, char * outhash[20]);
like look at that signature. it's giving main character energy fr fr π
π ARGUMENTS π
here's the breakdown of every single thing you're handing over, no skipping, we don't do that here:
Shishi * handleβ the shishi handle, and you get one of those fromshishi_init(). it's basically your VIP pass to everything ποΈconst char * keyβ an input character array holding the key you wanna use. the secret sauce, the ~key~ if you will πsize_t keylenβ the length of that input character array with the key to use. don't lie about the length, she'll know πconst char * inβ an input character array of the data you want to hash. this is the actual content getting the glow-up β¨size_t inlenβ the length of the input character array of data to hash. yes, it matters. always π«Άchar * outhash[20]β a newly allocated character array with the keyed hash of data. fresh out the box, your responsibility now π
π¦ DESCRIPTION π¦
so what does she actually do? she computes the keyed checksum of data using HMAC-SHA1. that's the whole thing. no cap. π
β οΈ but listen β the outhash buffer must be deallocated by the caller. that means you, bestie. you allocated it (well, she did, but on your behalf), so you free it. don't be the person who leaks memory, it's not the vibe π
β RETURN VALUE β
returns SHISHI_OK iff successful. that's it. that's the answer. if you see SHISHI_OK you're slaying, if you don't... well π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the people:
- Report bugs to
<bug-shishi@gnu.org>π§ - GNU Shishi home page:
http://www.gnu.org/software/shishi/π - General help using GNU software:
http://www.gnu.org/gethelp/π
π COPYRIGHT π
Copyright Β© 2002-2022 Simon Josefsson.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. yes she's free, she's generous, she's giving open source royalty π
π SEE ALSO π
The full documentation for shishi is maintained as a Texinfo manual. If the info and shishi programs are properly installed at your site, the command
info shishi
should give you access to the complete manual. go read it, it's the whole lore πβ¨
and that's a wrap on shishi_hmac_sha1(3), bestie π this page came to you from shishi version 1.0.3, dated back in the day, and honestly? she ate. mwah π
ππ¦πΈπ
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: shishi-doc 1.0.3-7 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms