Base64

Namespace

The JXG.Util.Base64 namespace provides Base64 routines.

Methods

Own

(private, static) _getByte(s, i) → {Number}

Extracts one byte from a string and ensures the result is less than or equal to 255.

Parameters

Name Type Description
s String
i Number

Returns

<= 255

Type
Number

Details

Source
utils/base64.js, line 57

(private, static) _getIndex(s, i) → {Number}

Determines the index of a base64 character in the base64 alphabet.

Parameters

Name Type Description
s String
i Number

Throws

If the character can not be found in the alphabet.

Type
Error

Returns

Type
Number

Details

Source
utils/base64.js, line 69

(static) decode(input, utf8) → {String}

Decode from Base64

Parameters

Name Type Description
input String

Base64 encoded data

utf8 Boolean

In case this parameter is true JXG.Util.UTF8.decode will be applied to the result of the base64 decoder.

Throws

If the string has the wrong length.

Type
Error

Returns

Type
String

Details

Source
utils/base64.js, line 135

(static) decodeAsArray(input) → {Array}

Decode the base64 input data as an array

Parameters

Name Type Description
input string

Returns

Type
Array

Details

Source
utils/base64.js, line 214

(static) encode(input) → {string}

Encode the given string.

Parameters

Name Type Description
input String

Returns

base64 encoded version of the input string.

Type
string

Details

Source
utils/base64.js, line 78

Inherited

none

Details

Base64

Source
utils/base64.js, line 48