Crypto Lib
    Preparing search index...

    Function openSealed

    • Open a sealed message, reporting a failed tag check as the caller's error. With the key and nonce lengths already checked, noble's decrypt fails only when the tag does not verify: a wrong key, wrong associated data or a modified ciphertext. noble throws a plain Error for it, which callers cannot tell apart from a fault in the library.

      Parameters

      • cipher: Opener
      • sealed: Uint8Array

      Returns Uint8Array

      CryptoError AUTH_FAILED when the tag does not verify.