Namespace JXG.Util.Base64
↳ JXG.Util.Base64
Defined in: base64.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Base64 routines
|
Method Attributes | Method Name and Description |
---|---|
<private> <static> |
JXG.Util.Base64._getByte(s, i)
Extracts one byte from a string and ensures the result is less than or equal to 255.
|
<private> <static> |
JXG.Util.Base64._getIndex(s, i)
Determines the index of a base64 character in the base64 alphabet.
|
<static> |
JXG.Util.Base64.decode(input, utf8)
Decode from Base64
|
<static> |
JXG.Util.Base64.decodeAsArray(input)
Decode the base64 input data as an array
|
<static> |
JXG.Util.Base64.encode(input)
Encode the given string.
|
Method Detail
<private> <static>
{Number}
JXG.Util.Base64._getByte(s, i)
Extracts one byte from a string and ensures the result is less than or equal to 255.
- Parameters:
- {String} s
- {Number} i
- Returns:
- {Number} <= 255
<private> <static>
{Number}
JXG.Util.Base64._getIndex(s, i)
Determines the index of a base64 character in the base64 alphabet.
- Parameters:
- {String} s
- {Number} i
- Throws:
- {Error}
- If the character can not be found in the alphabet.
- Returns:
- {Number}
<static>
{String}
JXG.Util.Base64.decode(input, utf8)
Decode from Base64
- Parameters:
- {String} input
- Base64 encoded data
- {Boolean} utf8
- In case this parameter is true JXG.Util.UTF8.decode will be applied to the result of the base64 decoder.
- Throws:
- {Error}
- If the string has the wrong length.
- Returns:
- {String}
<static>
{Array}
JXG.Util.Base64.decodeAsArray(input)
Decode the base64 input data as an array
- Parameters:
- {string} input
- Returns:
- {Array}
<static>
{string}
JXG.Util.Base64.encode(input)
Encode the given string.
- Parameters:
- {String} input
- Returns:
- {string} base64 encoded version of the input string.