Decrypts AES-256-GCM ciphertext produced by encryptAead.
Wraps WebCrypto errors in CryptoError to prevent DOMException from leaking into the public API.
CryptoKey imported via importAeadKey.
The ciphertext blob (includes the 16-byte GCM tag).
The IV used during encryption.
The decrypted plaintext.
'CIPHER/DECRYPTION_FAILED' on auth failure or corrupt data.
const plaintext = await decryptAead(key, ciphertext, iv); Copy
const plaintext = await decryptAead(key, ciphertext, iv);
Decrypts AES-256-GCM ciphertext produced by encryptAead.
Wraps WebCrypto errors in CryptoError to prevent DOMException from leaking into the public API.