Options
All
  • Public
  • Public/Protected
  • All
Menu

This module provides utilities to encode and decode base64 using the "standard" encoding, where characters 63 and 64 are + and / respectively. The Encode function appends padding = characters at the end of the encoded string, if required (with Decode, padding is always optional).

Index

Functions

Functions

Decode

  • Decode(str: string): ArrayBuffer
  • Decode a string from base64, using base64 "standard" encoding. Padding is always optional.

    Parameters

    • str: string

      Base64-encoded string

    Returns ArrayBuffer

    Data decoded from the base64 string

Encode

  • Encode(ab: ArrayBuffer): string
  • Encode an ArrayBuffer to base64 in a string, using base64 "standard" encoding.

    Parameters

    • ab: ArrayBuffer

      Data to encode to base64

    Returns string

    Base64-encoded string

Generated using TypeDoc