osi / des
des,3des for laravel
1.1.0
2018-12-05 10:28 UTC
Requires
- php: >=5.4
- lib-openssl: >=1.0.0
This package is auto-updated.
Last update: 2024-11-07 01:28:53 UTC
README
composer require osi/des
config
#config/app.php
Osi\Des\DesServiceProvider::class,
...
'Des' => Osi\Des\Facades\DesFacade::class,
'Des3' => Osi\Des\Facades\Des3Facade::class,
init
#.env
#.env
DES_MODE=des-ecb
DES3_MODE=des-ede3-cbc
DES_RES=
// base64,hex,''
DES_KEY=FFFFFFFFFFFFFFFFFFFFFFFF
DES_IV=FFFFFFFF
use
// $encrypt = \Des3::encrypt($key);
// $decrypt = \Des3::decrypt($encrypt);
$encrypt = \Des::encrypt($key);
$decrypt = \Des::decrypt($encrypt);
echo $encrypt . PHP_EOL . $decrypt;