กลับไปยังภาพรวม 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"}'
ลองในเบราว์เซอร์

เครื่องมือฟรีให้ผลลัพธ์เดียวกันโดยไม่ต้องเขียนโค้ดใดๆ

เปิดเครื่องมือ