加载接口文档…
146
累计调用
4ms
平均响应
100.00%
服务可用性
1,000 次/日
免费额度
无 Key 调用
每日 200 次 · QPS 5
登录免费
当前方案每日 1,000 次 · QPS 20
黄金会员
每日 50,000 次 · QPS 60
企业会员
每日 1,000,000 次 · QPS 120
复制文档地址
https://apizero.cn/aidocs/hash/raw.mdalgorithm=crc32。
| 名称 | 类型 | 说明 |
|---|---|---|
| text | string | 必填 · 待计算文本,UTF-8,最长 10000 字节 · 示例:hello |
| algorithm | string | 可选 · 算法,此处固定 crc32 · 默认 crc32 · 示例:crc32 |
| encoding | string | 可选 · 输出编码 hex(默认)/ base64 · 默认 hex · 示例:hex |
| hmac_key | string | 可选 · 可选;传入则切换 HMAC 模式 |
| 名称 | 类型 | 说明 |
|---|---|---|
| Authorization | string | 可选 · 推荐:Bearer <API Key>。兼容请求头 X-API-Key,以及 Query api_key / apikey / key(key 仅当值为 sk_live_/sk_test_/sk_stag_ 形态时生效)。匿名可不传,受每日免费额度限制。 |
| 名称 | 类型 | 说明 |
|---|---|---|
| text_length | integer | 文本字符数(UTF-8) |
| text_bytes | integer | 文本字节数 |
| encoding | string | 输出编码 hex / base64 |
| hmac | boolean | 是否 HMAC 模式 |
| hash_count | integer | 返回算法数量 |
| hashes | object | 哈希结果:algorithm / bits / value / length |
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn |
{
"code": 0,
"msg": "成功",
"data": {
"text_length": 5,
"text_bytes": 5,
"encoding": "hex",
"hmac": false,
"hash_count": 1,
"hashes": {
"crc32": {
"algorithm": "CRC32",
"bits": 32,
"value": "3d653119",
"length": 8
}
}
},
"tips": "极数本源 · https://apizero.cn"
}本接口仅做哈希计算,不存储传入文本和 HMAC 密钥。文本最大 10000 字节(约 3300 个中文字符)。MD5 / SHA-1 / CRC 系列已不再适合密码学场景,仅推荐用于一致性校验。