oath_bin2hex(3)
β¨ oath_bin2hex(3) β¨
okay bestie, welcome to liboath β this little cutie is oath_bin2hex, and it's literally the glow-up your binary data has been waiting for π
πΈ NAME πΈ
oath_bin2hex β it's an API function, no cap, and it's here to serve π«Ά
π SYNOPSIS π
#include <oath.h>
void oath_bin2hex(const char * binstr, size_t binlen, char * hexstr);
like, that's the whole vibe. short, iconic, to the point π
π¦ ARGUMENTS π¦
const char * binstrβ the input binary data. your raw, unedited self. we love her πsize_t binlenβ the length of that input binary databinstr. you gotta tell her how much she's working with, fr frchar * hexstrβ the output string with hex data. β οΈ and listen β she must have room for2*binlen+1. not2*binlen, not "eh, close enough."2*binlen+1. the+1is the NUL, she's important π
π DESCRIPTION π
So what does she actually do? She converts binary data into a NUL-terminated string with hex data. that's it, that's the whole job, and she does it flawlessly β¨
the output hexstr is allocated by the caller β that's you, bestie, you're the main character here β and it must have room for at least 2*binlen+1. why? because you need space for the encoded data and the terminating NUL byte. the math is mathing, the vibes are immaculate π
no cap: if you skimp on that buffer size, that's on you. the +1 is not decorative, she's load-bearing π
π SINCE π
1.12.0 β she's been around a minute. vintage, but make it fresh π
π REPORTING BUGS π
Found a bug? don't suffer in silence, bestie β report it to oath-toolkit-help@nongnu.org π§
- liboath home page:
https://oath-toolkit.codeberg.page/ - general help using GNU software:
http://www.gnu.org/gethelp/
π COPYRIGHT π
Copyright Β© 2009-2026 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. slay, honestly β free to share, just keep the receipts π«Ά
πΈ κ°ΰ¦ sign-off ΰ»κ± πΈ
that was oath_bin2hex(3) from liboath, version 2.6.15 β go forth and hex-encode responsibly, bestie. you're gonna ate this πβ¨
βββ
π¦ where this page comes from
- arch rolling: oath-toolkit 2.6.15-1 Β· GPL-3.0-or-later
- nixpkgs unstable: oath-toolkit 2.6.15
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms