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

sodium_crypto_aead_aes256gcm_is_available

PHP function Edit on GitHub ✎

(PHP 7 >= 7.2.0, PHP 8)

Check if hardware supports AES256-GCM

Description

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 Parameters

Return Values

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

Changelog

VersionDescription
8.4.0This 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.

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