Options
All
  • Public
  • Public/Protected
  • All
Menu

2fa-hotp-totp

Index

Namespaces

Functions

Functions

Const base32

  • base32(secret: string | Buffer): string
  • Base32 encoder without padding, thanks @LinusU

    Parameters

    • secret: string | Buffer

      text to be encoded

    Returns string

    base32 encoded secret

Const generateKey

  • generateKey(length?: number): Buffer
  • Generate random key with length

    Parameters

    • length: number = 64

      key. Default: 64

    Returns Buffer

    key

Generated using TypeDoc