Thrown when the provided encryption key is not 32 bytes OR when AES-GCM authentication fails on decrypt (wrong key or tampered ciphertext). Callers see a single failure mode for both, since they're indistinguishable from outside.
Construct an InvalidEncryptionKeyError.
Optional custom message.
Optional
Optional options object.
Underlying error to attach via Error.cause.
Error.cause
Thrown when the provided encryption key is not 32 bytes OR when AES-GCM authentication fails on decrypt (wrong key or tampered ciphertext). Callers see a single failure mode for both, since they're indistinguishable from outside.