Documentation
    Preparing search index...

    Function decodeBase64

    • Decodes standard, padded base64 back to bytes — strictly.

      "Strictly" means the decoder is the exact inverse of encodeBase64 and accepts nothing else: no whitespace or line breaks, no URL-safe -_, no missing padding, and no non-zero unused bits in a padded group ("Zg==" is accepted, "Zh==" is not — both would decode to the same byte, and a format that admits two spellings of one buffer cannot be compared byte for byte). Every rejection is a TypeError naming the offence.

      Parameters

      • text: string

        base64 text

      Returns ArrayBuffer

      a fresh ArrayBuffer of exactly the decoded length

      TypeError if the text is not canonical base64