base64_decode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 of src in 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