SPVM::MIME::Base64 - Base64 Encoding/Decoding
The MIME::Base64 class of SPVM has methods for Base64 encoding/decoding.
use MIME::Base64; my $encoded = MIME::Base64->encode_base64('Aladdin:open sesame'); my $decoded = MIME::Base64->decode_base64($encoded);
static method encode_base64 : string ($string : string, $eol : string = undef);
Encodes the string $string to a Base64 string, and returns it.
The argument $eol is the line-ending sequence to use. It is optional and defaults to \n.
\n
The returned encoded string is broken into lines of no more than 76 characters each and it will end with $eol unless it is empty.
Pass an empty string as the $eol if you do not want the encoded string to be broken into lines.
Exceptions:
$string must be defined. Otherwise an exception is thrown.
static method decode_base64 : string ($string : string);
Decodes a Base64 string $string to a string, and returns it.
Any character not part of the 65-character base64 subset is silently ignored. Characters occurring after a = padding character are never decoded.
=
static method encoded_base64_length : int ($string : string, $eol : string = undef);
Returns the length that the encoded string would have without actually encoding it.
This will return the same value as the length of the returned value of the "encode_base64" method, but should be more efficient.
static method decoded_base64_length : int ($string : string);
Returns the length that the decoded string would have without actually decoding it.
This will return the same value as the length of the returned value of the "decode_base64" method, but should be more efficient.
SPVM::MIME::QuotedPrint
MIME::QuotedPrint - SPVM::MIME::QuotedPrint is a MIME::QuotedPrint porting to SPVM
SPVM::MIME::Base64 - Github
Yuki Kimoto (kimoto.yuki@gmail.com)
Yoshiyuki Ito
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::MIME::Base64, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::MIME::Base64
CPAN shell
perl -MCPAN -e shell install SPVM::MIME::Base64
For more information on module installation, please visit the detailed CPAN module installation guide.