Decrypt a packed AES-256-GCM buffer (nonce prepended to ciphertext).
Input format: nonce(12) || ciphertext.
nonce(12) || ciphertext
The packed buffer to decrypt.
32-byte AES-256 key.
The decrypted plaintext as a Uint8Array.
Uint8Array
If key is not 32 bytes, the packed data is too short, or authentication fails.
key
Decrypt a packed AES-256-GCM buffer (nonce prepended to ciphertext).
Input format:
nonce(12) || ciphertext.