php8.5
Home/ Manual/ sodium / functions/ sodium_crypto_aead_aes256gcm_keygen

sodium_crypto_aead_aes256gcm_keygen

PHP function Edit on GitHub ✎

(PHP 7 >= 7.2.0, PHP 8)

Generate a random AES-256-GCM key

Description

sodium_crypto_aead_aes256gcm_keygen(): string

Generate a random key for use with sodium_crypto_aead_aes256gcm_encrypt() and sodium_crypto_aead_aes256gcm_decrypt().

Parameters Parameters

Return Values

Returns a 256-bit random key.

Changelog Aes256gcm-aarch64

Source: reference/sodium/functions/sodium-crypto-aead-aes256gcm-keygen.xml · from the official PHP manual (php/doc-en)