ZMQ_Z85_DECODE(3)

πŸ’– ZMQ_Z85_DECODE(3) πŸ’–

okay bestie, welcome to the 0MQ Manual β€” we're decoding some Z85 up in here and it's gonna be adorable. πŸŽ€


✨ NAME ✨

zmq_z85_decode β€” decode a binary key from Z85 printable text πŸ¦‹


🌸 SYNOPSIS 🌸

uint8_t *zmq_z85_decode (uint8_t *dest, const char *string);

πŸ’… DESCRIPTION πŸ’…

so like. zmq_z85_decode() shall decode string into dest. that's the whole job, bestie, and it eats. πŸ“

the length of string shall be divisible by 5. no exceptions, no vibes-based math, it's giving strict. πŸ™ˆ

and dest must be large enough for the decoded value β€” which is 0.8 x strlen (string). size it right or suffer the consequences, iykyk. πŸ’€

the encoding shall follow the ZMQ RFC 32 specification. periodt. ⭐


πŸ‘‘ RETURN VALUE πŸ‘‘

zmq_z85_decode() shall return dest if successful. and if it's not successful? it shall return NULL. that's it, that's the whole mood. πŸ’œ


πŸ”₯ EXAMPLE πŸ”₯

decoding a CURVE key, because we love a cryptographic moment:

const char decoded [] = "rq:rM>}U?@Lns47E1%kR.o@n%FcmmsL/@{H8]yf7";
uint8_t public_key [32];
zmq_z85_decode (public_key, decoded);

ate. no crumbs. ✨


🌈 SEE ALSO 🌈


🫢 AUTHORS 🫢

this page was written by the 0MQ community. if you wanna make a change, please read the 0MQ Contribution Policy at http://www.zeromq.org/docs:contributing πŸ’–


and that's the tea, bestie β€” this whole manual page came to you from 0MQ 4.3.5, dated 10/09/2023, under the name ZMQ_Z85_DECODE(3). slay, bye πŸ’…βœ¨

πŸ“¦ where this page comes from