node-totp
    Preparing search index...

    Interface Base32Api

    RFC 4648 Base32 helpers exposed by the public API.

    interface Base32Api {
        charset: string;
        decode(base32Str: string): Buffer;
        encode(buffer: Buffer): string;
    }
    Index

    Properties

    Methods

    Properties

    charset: string

    The canonical RFC 4648 Base32 alphabet.

    Methods

    • Decodes a canonical RFC 4648 Base32 string.

      Parameters

      • base32Str: string

        Base32 input to decode.

      Returns Buffer

      The decoded bytes.

      If the string contains invalid characters or non-canonical encoding.

    • Encodes a buffer as padded RFC 4648 Base32.

      Parameters

      • buffer: Buffer

        Bytes to encode.

      Returns string

      The padded Base32 string.