Skip to main content

Class: Base32

Class to help with base32 Encoding/Decoding using RFC4648.

Table of contents

Methods

Constructors

Methods

decode

Static decode(base32): Uint8Array

Convert the base 32 string to a byte array.

throws If the input string contains a character not in the Base32 alphabet.

Parameters

NameTypeDescription
base32stringThe base32 string to convert.

Returns

Uint8Array

The byte array.


encode

Static encode(bytes): string

Convert a byte array to base 32.

Parameters

NameTypeDescription
bytesUint8ArrayThe byte array to convert.

Returns

string

The data as base32 string.

Constructors

constructor

new Base32()