X114
返回 API 总览

hash

POST1 积分

Computes a cryptographic hash of a UTF-8 string. Useful for content fingerprinting, deduplication, and verifying integrity without sending the payload to a third-party service.

端点

POST https://x114.org/api/v1/hash

请求体

以 JSON 形式放在 POST 请求体中。

NameTypeRequiredDescription
textstringrequiredThe input text to hash. Up to 1 MB.
algorithm"sha1" | "sha256" | "sha384" | "sha512"optionalHash algorithm. Defaults to "sha256".

响应体

成功时返回的 JSON(HTTP 200)。

NameTypeRequiredDescription
okbooleanrequiredTrue on success.
algorithmstringrequiredThe algorithm used (uppercased).
hashstring (hex)requiredHex-encoded digest.
lengthnumberrequiredLength of the hex digest in characters (algorithm-dependent).

示例

curl -X POST https://x114.org/api/v1/hash \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{"text":"hello world","algorithm":"SHA-256"}'
在浏览器里试

这个免费工具无需写代码即可得到相同结果。

打开工具