Function decodeBytesRaw

  • Decodes cryptographic bytes (keys, signatures) using the given encoding. Note that this function doesn't check that the input is actually valid, but will truncate the output to only the valid prefix of input.

    Parameters

    • encoded: string

      the encoded string

    • encoding: CryptoBytesEncoding = "base64"

      one of the supported encoding specifiers. Default is base64, and padding is always stripped from base64 encoded output.

    Returns Buffer

    decoded bytes, truncated if the input does not properly match the encoding format

Generated using TypeDoc