| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
action |
string | 必填 | - | 操作:encrypt/decrypt/hash/encode/decode |
algorithm |
string | 必填 | - | 算法:AES-256-CBC/RSA-2048/SM4/MD5/SHA1/SHA256/SHA512/SM3/BASE64/URL |
content |
string | 必填 | - | 待处理文本,≤1MB |
key |
string | 选填 | - | 对称密钥(AES 32字节/SM4 16字节十六进制)或 RSA PEM 公私钥 |
iv |
string | 选填 | - | AES/SM4 初始向量(16 字节十六进制) |
output_encoding |
string | 选填 | hex |
加解密/hash 输出编码:hex/base64,默认 hex |
| 字段名 | 类型 | 说明 |
|---|---|---|
code | int | 状态码,0=成功 |
desc | string | 状态描述 |
data− |
object | 业务数据(成功时返回) |
result |
string | 处理结果 |
algorithm |
string | 所用算法 |
key_length |
int | 密钥或摘要字节长度 |
request_id | string | 请求追踪ID |
{
"code": 0,
"desc": "success",
"data": { ... },
"request_id": "abc123..."
}
{
"code": 999,
"desc": "错误描述",
"request_id": "abc123..."
}
© 网程科技(林州网程科技有限公司) | 豫ICP备2025120409号-2 | 豫B2-20230220 | 豫公网安备 41058102000262号