19 lines
555 B
Plaintext
19 lines
555 B
Plaintext
/**
|
|
* Decodes a base64 string to a byte array.
|
|
*
|
|
* - ignores white-space, including line breaks and tabs
|
|
* - allows inner padding (can decode concatenated base64 strings)
|
|
* - does not require padding
|
|
* - understands base64url encoding:
|
|
* "-" instead of "+",
|
|
* "_" instead of "/",
|
|
* no padding
|
|
*/
|
|
export declare function base64decode(base64Str: string): Uint8Array;
|
|
/**
|
|
* Encodes a byte array to a base64 string.
|
|
* Adds padding at the end.
|
|
* Does not insert newlines.
|
|
*/
|
|
export declare function base64encode(bytes: Uint8Array): string;
|