Registry / crypto / spomky-labs-php-aes-gcm

spomky-labs-php-aes-gcm

JSON →
library1.2.1phppackagistunverified

AES GCM (Galois Counter Mode) PHP implementation.

composer require spomky-labs/php-aes-gcm
INSTALL
IMPORT
SIG · SPOMKY-LABS-PHP-AE
S
spomky-labs-php-aes-gcm
cryptophpv1.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AesGcm
use SpomkyLabs\AesGcm\AesGcm;

Encrypt and decrypt data using AES-GCM

use SpomkyLabs\AesGcm\AesGcm; $key = random_bytes(32); // 256-bit key $plaintext = 'Hello, World!'; $nonce = random_bytes(12); // 96-bit nonce $ciphertext = AesGcm::encrypt($plaintext, $key, $nonce); echo base64_encode($ciphertext); $decrypted = AesGcm::decrypt($ciphertext, $key, $nonce); echo $decrypted; // Hello, World!
Debug
Known issues
breakingRequires PHP 7.2+ for sodium extension
fix
Ensure PHP 7.2+ with sodium extension enabled
affects: <1.0.0
Upgrade
Version history
1.2.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
Resources
spomky-labs-php-aes-gcm — pip install spomky-labs-php-aes-gcm · libregistry