Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<sodium_crypto_aead_aes256gcm_encryptsodium_crypto_aead_aes256gcm_keygen>
^Sodium FunctionsLast updated: Mon, 26 Oct 2026

sodium_crypto_aead_aes256gcm_is_available

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_aead_aes256gcm_is_available — Check if hardware supports AES256-GCM

Description

function sodium_crypto_aead_aes256gcm_is_available(): bool

The return value of this function depends on whether or not the hardware supports hardware-accelerated AES.

Parameters

This function has no parameters.

Return Values

Returns true if it is safe to encrypt with AES-256-GCM, and false otherwise.

Changelog

Version Description
8.4.0 This function may now return true on aarch64 CPUs with the ARM cryptographic extensions. Previously, hardware-accelerated AES-256-GCM was only detected on x86 and x86_64, and this function always returned false on aarch64.

<sodium_crypto_aead_aes256gcm_encryptsodium_crypto_aead_aes256gcm_keygen>
^Sodium FunctionsLast updated: Mon, 26 Oct 2026