Base64

base64 encoding/decoding

Index

Variables

  • ALPHA

  • PADCHAR

Functions

  • decode

  • encode

  • getByte64

Variables

<Const> ALPHA

● ALPHA: string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Defined in near.ts:1598

<Const> PADCHAR

● PADCHAR: string = "="

Defined in near.ts:1597

Functions

decode

decode(s: string): Uint8Array

Defined in near.ts:1608

Decode base64-encoded string and return a Uint8Array.

Parameters:

Name

Type

Description

s

string

Base64 encoded string.

Returns: Uint8Array

encode

encode(bytes: Uint8Array): string

Defined in near.ts:1657

Encode Uint8Array in base64.

Parameters:

Name

Type

Description

bytes

Uint8Array

Byte array of type Uint8Array.

Returns: string

getByte64

getByte64(s: string, i: u32): u32

Defined in near.ts:1600

Parameters:

Name

Type

s

string

i

u32

Returns: u32