Web::Transport::Base64
Base64 for the Web
SYNOPSIS
use Web::Transport::Base64;
$encoded = encode_web_base64 $bytes;
$bytes = decode_web_base64 $string;
DESCRIPTION
The Web::Transport::Base64
module defines an API to encode or decode byte string using Base64.
FUNCTIONS
These functions are exported by default:
$string = encode_web_base64 $bytes
-
Encode a byte string using Base64 and return the result string (i.e. Base64-encoded ASCII string). The argument must not be a utf8-flagged string.
This function is an implementation of the "forgiving-base64 encode" operation of the Infra Standard.
$bytes = decode_web_base64 $string
-
Decode a byte or character string using Base64 and return the result byte string. If the input is not interpretable as a Base64-encoded string,
undef
is returned instead.This function is an implementation of the "forgiving-base64 decode" operation of the Infra Standard.
$string = encode_web_base64url $bytes
-
Encode a byte string using base64url and return the result string (i.e. base64url-encoded ASCII string). The argument must not be a utf8-flagged string.
$bytes = decode_web_base64url $string
-
Decode a byte or character string using base64url and return the result byte string. If the input is not interpretable as a base64url-encoded string,
undef
is returned instead.
DEPENDENCY
This module is a wrapper of MIME::Base64, which is a core module of Perl.
SPECIFICATIONS
Infra Standard <https://infra.spec.whatwg.org/#forgiving-base64>
.
AUTHOR
Wakaba <wakaba@suikawiki.org>.
LICENSE
Copyright 2018-2019 Wakaba <wakaba@suikawiki.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.