Encrypt a UTF-8 string with AES-256-GCM.
Convenience wrapper that encodes the string to bytes before encrypting.
The string to encrypt.
32-byte AES-256 key.
Object containing the ciphertext and the random nonce used.
ciphertext
nonce
If key is not exactly 32 bytes.
key
Encrypt a UTF-8 string with AES-256-GCM.
Convenience wrapper that encodes the string to bytes before encrypting.