(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_aead_aes256gcm_encrypt — Encrypt then authenticate with AES-256-GCM
$message,$additional_data,$nonce,$key
Encrypt then authenticate with AES-256-GCM.
Only available if sodium_crypto_aead_aes256gcm_is_available() returns true.
messageadditional_datanoncekeyReturns the ciphertext and authentication tag as a string of raw binary bytes. (Format: ciphertext, then tag.)