mradang/encryption

v1.2 2018-10-06 06:30 UTC

This package is auto-updated.

Last update: 2024-11-05 20:23:57 UTC


README

安装

composer require mradang/encryption

使用

// 加密,默认使用 AES-256-CBC 加密,$key 长度为32
$encrypter = new \mradang\Encryption\Encrypter($key);
$encrypt = $encrypter->encrypt($text);

// 解密
$encrypter = new \mradang\Encryption\Encrypter($key);
$decrypt = $encrypter->decrypt($encrypt);