UriBase64
in package
FinalYes
Provides URL-safe Base64 encoding.
Table of Contents
Methods
- decode() : string|false
- Decodes data encoded with URI-safe MIME base64.
- encode() : string
- Encodes data with URI-safe MIME base64.
Methods
decode()
Decodes data encoded with URI-safe MIME base64.
public
static decode(string $string[, bool $strict = false ]) : string|false
Parameters
- $string : string
-
The encoded data.
- $strict : bool = false
-
If the strict parameter is set to true then the base64_decode() function will return false if the input contains character from outside the base64 alphabet. Otherwise invalid characters will be silently discarded.
Return values
string|false —Returns the decoded data or false on failure. The returned data may be binary.
encode()
Encodes data with URI-safe MIME base64.
public
static encode(string $string) : string
Parameters
- $string : string
-
The data to encode.
Return values
string —The encoded data, as a string.