docs::a...:Base64(3)
π NAME π
APR::Base64 β the Perl API that gives you APR's base64 encoding/decoding glow-up β¨ like it's literally the bridge between your cute little strings and APR's whole base64 situation.
πΈ Synopsis πΈ
okay bestie, here's the vibe:
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 i did not add semicolons, that's exactly how it is in the original, leave it π )
π¦ Description π¦
APR::Base64 gives you access to APR's base64 encoding and decoding API. that's it. that's the whole pitch. it's giving "small module, big slay" π
β¨ API β¨
APR::Base64 provides the following functions and/or methods β all three of them, and yes we're covering every single one, no skipping π
π decode
Decode a base64 encoded string. turn that scrambled text back into readable vibes π
$decoded = decode($encoded);
- arg1:
$encoded( string ) β the encoded string. the cryptic one. the "what does this even say" one. - ret:
$decoded( string ) β the decoded string. the reveal. the main character moment π - since: 2.0.00
π encode
Encode a string to base64. wrap your precious clear text up in a little disguise π
$encoded = encode($clear);
- arg1:
$clear( string ) β the unencoded string. plain, honest, unbothered. - ret:
$encoded( string ) β the encoded string. now it's all base64-ified β¨ - since: 2.0.00
π encode_len
Given the length of an unencoded string, get the length of the encoded string. yes it's just a length calculator but it's the length calculator and we respect her π
$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
fr fr note: all three of these are since: 2.0.00, so if you're on something older, bestie... no. π
π§ See Also π§
mod_perl 2.0 documentation. go read it, iykyk π«Ά
β Copyright β
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. (the whole squad, can't forget them π)
and that's the page!! brought to you by perl v5.42.3 on 2023-10-21 β mwah, go encode something cute πΈπ¦π
π¦ where this page comes from
- nixos 26.05: mod_perl 2.0.13
- nixpkgs unstable: mod_perl 2.0.13
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms