shishi_checksum(3)
π shishi_checksum β the tea β
okay bestie, so this is a page from the shishi manual, section 3 (that's the library-functions section, iykyk), and today's main character is shishi_checksum. she does integrity protection. she's not flashy, but she carries. π«Ά
β¨ NAME β¨
shishi_checksum β an API function, bestie. that's the whole vibe. she computes a checksum so you know nobody messed with your data. no cap. π
πΈ SYNOPSIS πΈ
#include <shishi.h>
int shishi_checksum(Shishi * handle, Shishi_key * key, int keyusage, int
cksumtype, const char * in, size_t inlen, char ** out, size_t * outlen);
likeβ¦ look at her. eight whole arguments. she's doing the most and honestly? respect. π
π ARGUMENTS π
Shishi * handleβ the shishi handle you got fromshishi_init(). it's literally your whole ticket to the party, don't show up without it. πShishi_key * keyβ the key you're computing the checksum with. she's the moment. she's the blueprint.int keyusageβ an integer saying what this key is for. context matters bestie, keys have range. πint cksumtypeβ the checksum algorithm you wanna use. pick your fighter. π₯const char * inβ input array holding the data you wanna integrity-protect. your precious little bytes. πsize_t inlenβ the size of that input array. yes, you have to tell her how big it is. she's not a mind reader (derogatory). πchar ** outβ output array with the newly allocated integrity-protected data. brand new, freshly malloc'd, hot off the press. β¨size_t * outlenβ output variable that receives the length of the output array with the checksum. so you know how much to read. so thoughtful of her. πΈ
π DESCRIPTION π
so basically: she integrity protects your data using key, and that key might be altered by the supplied key usage. π
IMPORTANT BESTIE: if key usage is 0, no key derivation is used. periodt. write that down.
also, and this is the part people always forget:
the OUT buffer must be deallocated by the caller.
like. you have to free it. she's not gonna do it for you. that's your responsibility, that's your character arc, that's your problem now. π«Ά
β RETURN VALUE β
returns SHISHI_OK iff successful. that's it, that's the bar. if you see SHISHI_OK you ate. π
π REPORTING BUGS π
found a bug? (not her fault obviously, but like, hypothetically) report it 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.
(tl;dr: she's free, she's open, she's generous, just keep the receipts. iconic behaviour honestly.) π
π 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. so if you're nosy (affectionate) that's where you go. πβ¨
okay that's the whole page, you're caught up, go forth and integrity-protect. mwah. π
this was shishi version 1.0.3, and we were reading shishi_checksum(3) β tysm for coming to my TED talk, ily, bye bestie!! π¦πΈπ
π¦ 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