libapa...:Base64(3pm)

๐Ÿ’– NAME ๐Ÿ’–

APR::Base64 โ€” the Perl API for APR's base64 encoding/decoding functionality. It's the manual page libapa...:Base64(3pm), bestie, and it's a short one but a cute one. โœจ


๐ŸŒธ Synopsis ๐ŸŒธ

Okay so this is literally all you need to get going:

use APR::Base64 ();

my $clear   = "foo"
my $encoded = APR::Base64::encode($clear);
my $decoded = APR::Base64::decode($encoded);
my $len_enc = APR::Base64::encode_len(length $clear);

(No fr, that semicolon situation after "foo" is exactly how it's written up there. Keep it as-is. ๐Ÿซถ)


๐Ÿฆ‹ Description ๐Ÿฆ‹

APR::Base64 gives you access to APR's base64 encoding and decoding API. That's it, that's the whole vibe. Encode stuff, decode stuff, and know how long your encoded stuff is gonna be before you even do it. Iconic honestly. ๐Ÿ’…


๐Ÿ‘‘ API ๐Ÿ‘‘

APR::Base64 provides the following functions and/or methods:

๐ŸŽ€ decode

Decode a base64 encoded string. It un-scrambles the scrambled. main character energy.

$decoded = decode($encoded);
  • arg1: $encoded ( string ) โ€” The encoded string. Like, the one you wanna turn back into normal words.
  • ret: $decoded ( string ) โ€” The decoded string. Your reward. ๐Ÿ“
  • since: 2.0.00

โœจ encode

Encode a string to base64. Take your clear text and give it that base64 glow-up.

$encoded = encode($clear);
  • arg1: $clear ( string ) โ€” The unencoded string. The before picture.
  • ret: $encoded ( string ) โ€” The encoded string. The after picture. ๐Ÿ’–
  • since: 2.0.00

๐Ÿงš encode_len

Given the length of an unencoded string, get the length of the encoded string. It's the fortune teller of base64. ๐Ÿ”ฎ

$len_enc = encode_len($len_clear);
  • arg1: $len_clear ( integer ) โ€” the length of an unencoded string.
  • ret: $len_enc ( integer ) โ€” the length of the string after it is encoded
  • since: 2.0.00

๐ŸŒˆ See Also ๐ŸŒˆ

mod_perl 2.0 documentation. โ€” go read it, iykyk. ๐Ÿ“š


mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.


โญ Authors โญ

The mod_perl development team and numerous contributors. Legends, every single one. ๐Ÿ‘‘


ngl this whole page is giving "short but mighty." No cap, three functions and zero drama. Go encode something. ๐Ÿ’€โœจ

Sign-off time, bestie: this page ships with perl v5.42.3 and it's dated 2026-08-20. Mwah. ๐Ÿซถ๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from