Polkadot Apps
    Preparing search index...

    Function chachaDecryptText

    • Decrypt ChaCha20-Poly1305 ciphertext back to a UTF-8 string.

      Parameters

      • ciphertext: Uint8Array

        Data to decrypt.

      • key: Uint8Array

        32-byte encryption key.

      • nonce: Uint8Array

        12-byte nonce used during encryption.

      Returns string

      The decrypted plaintext string.

      If decryption or authentication fails.