Laravel wrapper for the AGE cli
Important
Make sure you have the AGE cli installed on your system. You can find the installation instructions here.
You can install the package via composer:
composer require castelnuovo/laravel-age
use Castelnuovo\LaravelAge\Age;
$message = 'Hello World!';
$age = Age::generateKeypair();
$privateKey = $age->getPrivateKey();
$publicKey = $age->getPublicKey();
$age2 = new Age(publicKey: $publicKey);
$encrypted_message = $age2->encrypt($message);
$age3 = new Age(privateKey: $privateKey);
$decrypted_message = $age3->decrypt($encrypted_message);
echo $message === $decrypted_message ? 'Success' : 'Failed';
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.