Options
All
  • Public
  • Public/Protected
  • All
Menu

Base 64 encoder/decoder

Hierarchy

  • Base64

Index

Properties

Private ALPHA

ALPHA: string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Private PADCHAR

PADCHAR: string = "="

Methods

decode

  • decode(s: string): string
  • Takes in a previously encoded string and returns the decoded result

    const B64 = new Base64();
    let coded = B64.encode("abc123"); // "YWJjMTIz"
    let decoded = B64.decode(coded); // "abc123"
    

    Parameters

    • s: string

    Returns string

encode

  • encode(s: string): string
  • Encodes a string using Base 64 encoding

    const B64 = new Base64();
    let coded = B64.encode("abc123"); // "YWJjMTIz"
    

    Parameters

    • s: string

    Returns string

Private getByte

  • getByte(s: string, i: number): number

Private getByte64

  • getByte64(s: string, i: number): number

Generated using TypeDoc