Registry /
crypto / spomky-labs-php-aes-gcm
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!
Audit
Dependencies
No dependency data recorded yet.