phprush / simple-encrypt
simple encrypt lib
This package's canonical repository appears to be gone and the package has been frozen as a result.
v1.1.4
2017-11-20 14:45 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2021-08-26 11:59:58 UTC
README
###示例代码
<?php
try {
$sign = SimplaeEncrypt::createSign();
dump($sign);
} catch ( Exception $e) {
dump($e);
}
使用方式
/**
* Laravel 5 简单的加密插件
* @exception Exception
* @return array
*/
安装方式
composer require phprush/simple-encrypt
php artisan vendor:publish --provider="PhpRush\SimplaeEncrypt\SimplaeEncryptServiceProvider"
###### https://d.laravel-china.org/docs/5.5/providers
array_merge(config('app.providers'), [
PhpRush\SimplaeEncrypt\SimplaeEncryptServiceProvider::class
]);
###### https://d.laravel-china.org/docs/5.5/facades
array_merge(config('app.aliases'), [
'SimplaeEncrypt' => PhpRush\SimplaeEncrypt\Facades\SimplaeEncrypt::class
]);
在config/simple_encrypt.php 中使用 env('SIMPLE_ENCRYPT_APP_KEY')/env('SIMPLE_ENCRYPT_APP_SECRET')
vim .env
SIMPLE_ENCRYPT_APP_KEY=xxxxxxxx
SIMPLE_ENCRYPT_APP_SECRET=xxxxxxxx