# 文本工具
**请求方式:** GET
**接口地址:** https://api.hk0.cc/api/txt
**接口描述:** 哈希/随机码/字符统计/URL编解码. hash: text+algo(md5/sha1/sha256/sha512/crc32); random: type(code/pw/num)+len; stat; urlencode/urldecode
## 请求参数
| 参数名 | 可传值说明 | 传入位置 | 是否必填 | 示例值 | 默认值 | 参数说明 |
|--------|----------|----------|----------|--------|--------|----------|
| action | string | query | 必传 | — | — | hash/random/stat/urlencode/urldecode, 必填 |
| text | string | query | 可选 | — | — | 输入文本(hash/stat/urlencode/urldecode 需要) |
| algo | string | query | 可选 | — | — | 哈希算法 md5/sha1/sha256/sha512/crc32, 默认md5 |
| type | string | query | 可选 | — | — | random 类型: code(卡密)/pw(密码)/num(数字) |
| len | int | query | 可选 | — | — | 随机串长度 1-256, 默认16 |
## 返回示例
```json
{
"code": 200,
"msg": "success",
"data": {
"algo": "sha256",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
}
```