base64.encode

base64.encode

base64.encode

Function

Encode the text stored in base64(text) into a Base64 string.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
modeIntNo0Coding table: 0 BASE64_STANDARD, 1 BASE64_STANDARD_NO_PAD, 2 BASE64_URL_SAFE, 3 BASE64_URL_SAFE_NO_PAD.

Return value

TypeDescription
StringReturns the encoded Base64 string.

Example

Notes

  • Input text is encoded in UTF-8 bytes.