array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.sodium-crypto-aead-aes256gcm-keygen.php', 1 => 'sodium_crypto_aead_aes256gcm_keygen', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Functions', ), 'prev' => array ( 0 => 'function.sodium-crypto-aead-aes256gcm-is-available.php', 1 => 'sodium_crypto_aead_aes256gcm_is_available', ), 'next' => array ( 0 => 'function.sodium-crypto-aead-chacha20poly1305-decrypt.php', 1 => 'sodium_crypto_aead_chacha20poly1305_decrypt', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-crypto-aead-aes256gcm-keygen.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_crypto_aead_aes256gcm_keygen — Generate a random AES-256-GCM key
Generate a random key for use with sodium_crypto_aead_aes256gcm_encrypt() and sodium_crypto_aead_aes256gcm_decrypt().
This function has no parameters.
Returns a 256-bit random key.