cURL
curl "https://api.ruseo.cn/api/rabbit?text=Hello+World&key=1234567890123456&iv=demo&action=encrypt&output=base64"
Rabbit流密码加密解密(eSTREAM),128位密钥,可选64位IV。
https://api.ruseo.cn/api/rabbit
接口调用前需要确认的核心配置。
/api/rabbitrabbit必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
text |
是 | string | 要加密或解密的文本 | Hello World |
key |
否 | string | 密钥16字节默认1234567890123456 | 1234567890123456 |
iv |
否 | string | 初始向量8字节可选 | |
action |
否 | string | encrypt加密或decrypt解密默认自动检测 | encrypt |
output |
否 | string | 输出格式base64或hex默认base64 | base64 |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/rabbit?text=Hello+World&key=1234567890123456&iv=demo&action=encrypt&output=base64
curl "https://api.ruseo.cn/api/rabbit?text=Hello+World&key=1234567890123456&iv=demo&action=encrypt&output=base64"
$url = 'https://api.ruseo.cn/api/rabbit?text=Hello+World&key=1234567890123456&iv=demo&action=encrypt&output=base64';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/rabbit?text=Hello+World&key=1234567890123456&iv=demo&action=encrypt&output=base64')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "rabbit",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
success |
boolean | 是否成功 | true |
action |
string | 实际执行的操作 | encrypt |
input |
string | 输入文本 | Hello World |
output |
string | 加密或解密结果 | |
has_iv |
boolean | 是否使用了IV | false |
点击左侧“发送请求”查看结果...