Polkadot Apps
    Preparing search index...

    Function xchachaDecryptPacked

    • Decrypt a packed XChaCha20-Poly1305 buffer (nonce prepended to ciphertext).

      Input format: nonce(24) || ciphertext.

      Parameters

      • packed: Uint8Array

        The packed buffer to decrypt.

      • key: Uint8Array

        32-byte encryption key.

      Returns Uint8Array

      The decrypted plaintext.

      If the packed data is too short, key is invalid, or authentication fails.