base64_decode(9)
π base64_decode(9) β Kernel API Manual π
okay so bestie, welcome to the Kernel API Manual page for base64_decode π
this is the lil function that takes your Base64 string and turns it back into raw decoded bytes. no NUL-terminator drama, we got lengths. let's go β¨
πΈ NAME πΈ
base64_decode β Base64-decode a string π
β¨ SYNOPSIS β¨
int base64_decode (const char *src , int srclen , u8 *dst , bool padding
, enum base64_variant variant );
π ARGUMENTS π
srcβ the string to decode. and nope, it doesn't need to be NUL-terminated π«Άsrclenβ the length ofsrcin bytes πdstβ (output) the decoded binary data π§paddingβ whether the input is expected to include'='padding characters π€variantβ which base64 variant to use π
π DESCRIPTION π
Decodes a string using the selected Base64 variant. periodt β pick your variant, pass the string, get decoded data. slay π
π«Ά RETURN π«Ά
returns the length of the resulting decoded binary data in bytes, or -1 if the string isn't a valid Base64 string π so if it ate, you get the byte count; if it's invalid, -1 says nope π
π₯ SEE ALSO π₯
- Kernel file
./lib/base64.cπ§ base64_encode(9)β also peep this one β¨
that's the page, bestie! source/version: ./lib; date: October 2026; manual name: base64_decode(9) β bye ππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms