castelnuovo / laravel-age
Laravel wrapper for the AGE cli
v2.1.0
2024-07-03 11:43 UTC
Requires
- php: ^8.2
- illuminate/contracts: ^11.0
- spatie/laravel-package-tools: ^1.14.0
- spatie/temporary-directory: ^2.2
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^8.1
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.5
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
README
castelnuovo/laravel-age
Laravel wrapper for the AGE cli
Installation
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
Usage
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';
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.