HMAC.H(3)
π¦ hmac.h(3) β the HMAC glow-up, bestie edition β¨
okay so real talk, this page lives at /home/abui.../zpc/hmac.h(3) and it's from the Library Functions Manual β yes, that's the vibe. it's the man page for the header file
/home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/hmac.h
and it's the HMAC API. π
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/libzpc-legacy-1.5.0-build/libzpc-1.5.0/include/zpc/hmac.h β HMAC API. that's it, that's the whole name, path and all, no cap π (yes the full build path is literally part of it, she ate and left no crumbs)
π SYNOPSIS π
functions (the whole squad) π«Ά
int zpc_hmac_alloc (struct zpc_hmac **ctx)
int zpc_hmac_set_key (struct zpc_hmac *ctx, struct zpc_hmac_key *key)
int zpc_hmac_sign (struct zpc_hmac *ctx, unsigned char *mac, size_t
maclen, const unsigned char *msg, size_t msglen)
int zpc_hmac_verify (struct zpc_hmac *ctx, const unsigned char *mac,
size_t maclen, const unsigned char *msg, size_t msglen)
void zpc_hmac_free (struct zpc_hmac **ctx)
β¨ Detailed Description β¨
HMAC API.
so this is the message authentication API for the Hash-based Message Authentication Code β HMAC, iykyk. it's literally the thing that makes sure nobody messed with your message. lowkey iconic. π
Definition in file hmac.h.
π Function Documentation π
int zpc_hmac_alloc (struct zpc_hmac ** ctx) π±
Allocate a shiny new context for an HMAC operation. fresh context, main character energy.
Parameters (the deets):
ctxβ HMAC context
Returns: 0 on success. Otherwise, a non-zero error code is returned. bestie if it's not zero, something went sideways π
int zpc_hmac_set_key (struct zpc_hmac * ctx, struct zpc_hmac_key * key) π
Set the key to be used in the context of an HMAC operation. give her the key and she'll do the rest β¨
Parameters:
ctxβ HMAC contextkeyβ HMAC key
Returns: 0 on success. Otherwise, a non-zero error code is returned. periodt.
int zpc_hmac_sign (struct zpc_hmac * ctx, unsigned char * mac, size_t maclen, const unsigned char * msg, size_t msglen) ποΈ
Do an HMAC signing operation. we're signing things, we're THAT girl now.
Parameters:
ctxβ HMAC contextmacβ message authentication code. so here's the tea π«: whenmacis set toNULL, this indicates that an internal intermediate MAC is calculated, and further intermediate calls with additionalmsgdata may follow. If themacparm is notNULLand themaclenis a valid MAC length (dependent on the underlying hash function of the key), the final MAC is computed.maclenβ message authentication code length [bytes]msgβ messagemsglenβ message length [bytes]
Returns: 0 on success. Otherwise, a non-zero error code is returned. slay π
int zpc_hmac_verify (struct zpc_hmac * ctx, const unsigned char * mac, size_t maclen, const unsigned char * msg, size_t msglen) π
Do an HMAC verify operation. vibe check on the MAC, fr fr.
Parameters:
ctxβ HMAC contextmacβ message authentication code. if themacparm isNULL, then an intermediate verify op is performed. If themacparm is notNULLand themaclenis a valid MAC length (dependent on the underlying hash function of the key), then the given MAC is checked for correctness. πmaclenβ message authentication code length [bytes]msgβ messagemsglenβ message length [bytes]
Returns: 0 on success. Otherwise, a non-zero error code is returned. no cap.
void zpc_hmac_free (struct zpc_hmac ** ctx) π§Ή
Free an HMAC context. clean up after yourself, we love a responsible queen π (note: it returns void, so you're not getting an error code back, she just goes)
Parameters:
ctxβ HMAC context
π Author π
Generated automatically by Doxygen for libzpc from the source code. not a human, a whole robot wrote this, respect β¨
and that's the whole page bestie, go build something cute with it π¦π
objective: libzpc β Version 1.4 β dated /home/abui.../zpc/hmac.h(3). mwah, signing off π
π¦ where this page comes from
- opensuse-leap 16.0: libzpc-legacy-devel 1.5.0-160000.2.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms