crypt.base64

Classes


Public Protected Private

Global Functions

goog.crypt.base64.decodeString(inputopt_webSafe) string
Base64-decode a string.
Arguments:
input : string
to decode.
opt_webSafe : boolean=
True if we should use the alternative alphabet.
Returns: string  string representing the decoded value.
code »
goog.crypt.base64.decodeStringToByteArray(inputopt_webSafe) !Array
Base64-decode a string. In base-64 decoding, groups of four characters are converted into three bytes. If the encoder did not apply padding, the input length may not be a multiple of 4. In this case, the last group will have fewer than 4 characters, and padding will be inferred. If the group has one or two characters, it decodes to one byte. If the group has three characters, it decodes to two bytes.
Arguments:
input : string
Input to decode.
opt_webSafe : boolean=
True if we should use the web-safe alphabet.
Returns: !Array  bytes representing the decoded value.
code »
goog.crypt.base64.encodeByteArray(inputopt_webSafe) string
Base64-encode an array of bytes.
Arguments:
input : Array.<number> | Uint8Array
An array of bytes (numbers with value in [0, 255]) to encode.
opt_webSafe : boolean=
Boolean indicating we should use the alternative alphabet.
Returns: string  The base64 encoded string.
code »
goog.crypt.base64.encodeString(inputopt_webSafe) string
Base64-encode a string.
Arguments:
input : string
A string to encode.
opt_webSafe : boolean=
If true, we should use the alternative alphabet.
Returns: string  The base64 encoded string.
code »
goog.crypt.base64.init_()
Lazy static initialization function. Called before accessing any of the static map variables.
code »

Global Properties

goog.crypt.base64.ENCODED_VALS :
Our default alphabet. Value 64 (=) is special; it means "nothing."
Code »
goog.crypt.base64.ENCODED_VALS_BASE :
Our default alphabet, shared between ENCODED_VALS and ENCODED_VALS_WEBSAFE
Code »
goog.crypt.base64.ENCODED_VALS_WEBSAFE :
Our websafe alphabet.
Code »
goog.crypt.base64.HAS_NATIVE_SUPPORT :
Whether this browser supports the atob and btoa functions. This extension started at Mozilla but is now implemented by many browsers. We use the ASSUME_* variables to avoid pulling in the full useragent detection library but still allowing the standard per-browser compilations.
Code »
goog.crypt.base64.byteToCharMapWebSafe_ :
Maps bytes to websafe characters.
Code »
goog.crypt.base64.byteToCharMap_ :
Maps bytes to characters.
Code »
goog.crypt.base64.charToByteMapWebSafe_ :
Maps websafe characters to bytes.
Code »
goog.crypt.base64.charToByteMap_ :
Maps characters to bytes.
Code »

Package crypt

Package Reference