- Source:
Methods
(export, static) concat(…var_args) → {Uint8Array}
Concatenate Uint8Arrays.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
var_args |
Uint8Array |
<repeatable> |
- Source:
Returns:
- Type
- Uint8Array
(export, static) equal(arr1, arr2) → {boolean}
Compare two Uint8Arrays for equality.
Parameters:
Name | Type | Description |
---|---|---|
arr1 |
Uint8Array | |
arr2 |
Uint8Array |
- Source:
Returns:
- Type
- boolean
(export, static) fromBase64(str) → (non-null) {Uint8Array}
Convert a base64 string to a Uint8Array. Accepts either the standard
alphabet or the alternate "base64url" alphabet.
Parameters:
Name | Type | Description |
---|---|---|
str |
string |
- Source:
Returns:
- Type
- Uint8Array
(export, static) fromHex(str) → (non-null) {Uint8Array}
Convert a hex string to a Uint8Array.
Parameters:
Name | Type | Description |
---|---|---|
str |
string |
- Source:
Returns:
- Type
- Uint8Array
(export, static) toBase64(arrnon-null, opt_paddingopt) → {string}
Convert a Uint8Array to a base64 string. The output will always use the
alternate encoding/alphabet also known as "base64url".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arr |
Uint8Array | ||
opt_padding |
boolean |
<optional> |
If true, pad the output with equals signs. Defaults to true. |
- Source:
Returns:
- Type
- string
(export, static) toHex(arrnon-null) → {string}
Convert a Uint8Array to a hex string.
Parameters:
Name | Type | Description |
---|---|---|
arr |
Uint8Array |
- Source:
Returns:
- Type
- string