Skip to main content

Class: Base64

Class to help with base64 Encoding/Decoding. Sourced from https://github.com/beatgammit/base64-js.

Table of contents

Methods

Constructors

Methods

byteLength

Static byteLength(base64): number

Get the byte length of the data.

Parameters

NameTypeDescription
base64stringThe base64 string.

Returns

number

The byte length of the data.


decode

Static decode(base64): Uint8Array

Convert the base 64 string to a byte array.

Parameters

NameTypeDescription
base64stringThe base64 string to convert.

Returns

Uint8Array

The byte array.


encode

Static encode(bytes): string

Convert a byte array to base 64.

Parameters

NameTypeDescription
bytesUint8ArrayThe byte array to convert.

Returns

string

The data as bas64 string.

Constructors

constructor

new Base64()