eshow/encryption

eshow encryption php sdk

v0.0.2 2023-07-27 08:07 UTC

This package is not auto-updated.

Last update: 2025-06-26 17:04:49 UTC


README

解密sdk

安装

composer require eshow/encryption

使用

use Eshow\Encryption\bin\Action;
use Eshow\Encryption\exception\PubKeyException;

$decryptData = ""; //需要解密的数据
$config = [
    "timestampLimit"=>60,//超时时间
    "publicKey"=>""//公钥
];
try {

    $action = new Action($config);
    $data = $action->decrypt($decryptData);
}catch (PubKeyException $exception){

}

异常

code message
10004 时间戳无效,数据可能被篡改或过期
10003 数据格式不正确
10002 解密失败
10001 非法密钥