castelnuovo / laravel-age
Laravel 对 AGE 命令行工具的封装
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 对 AGE 命令行工具的封装
安装
重要
请确保您系统上已安装 AGE 命令行工具。您可以在此处找到安装说明:here。
您可以通过 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
变更日志
有关最近更改的更多信息,请参阅 CHANGELOG。
贡献
有关详细信息,请参阅 CONTRIBUTING。
安全漏洞
有关如何报告安全漏洞,请参阅 我们的安全策略。
致谢
许可证
MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件。