SHA256 Hash API
Compute cryptographic SHA256 hashes programmatically via a simple REST API. Send any string or binary data and receive the 64-character hex digest — the same output as openssl dgst -sha256 or Python's hashlib.sha256.
How it works
POST your input data as a JSON string. The API computes a SHA-256 digest using Node.js's built-in crypto module (no external dependencies) and returns the lowercase hex-encoded 32-byte hash. Processing is deterministic: the same input always produces the same output.
Use cases
- Verify file integrity — hash a downloaded file and compare to a published checksum
- Generate cache keys — create a stable identifier for any piece of content
- Build content-addressable storage systems or deduplication pipelines
- Implement API request signing where SHA256 is the required digest algorithm
- Generate unique identifiers from composite fields without a database sequence
API Reference
POST https://slopshop.gg/v1/crypto-hash-sha256
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input / data |
string | required | The input data to hash or process |
Example response
{
"data": {
"hash": "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3",
"algorithm": "sha256",
"input_length": 11
},
"meta": {
"credits_used": 1,
"engine": "real",
"ms": 4
}
}
Examples
Three real-world scenarios showing how developers use SHA256 Hash in production.
curl -X POST https://slopshop.gg/v1/crypto-hash-sha256 \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"data": "mysecretpassword"}'
curl -X POST https://slopshop.gg/v1/crypto-hash-sha256 \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"data": "user:42:profile:settings"}'
curl -X POST https://slopshop.gg/v1/crypto-hash-sha256 \
-H "Authorization: Bearer $SLOPSHOP_KEY" \
-H "Content-Type: application/json" \
-d '{"data": "contents of important document..."}'
Code examples
curl
curl -X POST https://slopshop.gg/v1/crypto-hash-sha256 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "your data here"}'
Python
import requests
response = requests.post(
"https://slopshop.gg/v1/crypto-hash-sha256",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"input": "your data here"}
)
result = response.json()
print(result["data"])
Node.js
const response = await fetch("https://slopshop.gg/v1/crypto-hash-sha256", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);
CLI
# Install the Slopshop CLI
npm install -g slopshop
# Set your API key
export SLOPSHOP_KEY=your_api_key
# Call crypto-hash-sha256
slop crypto-hash-sha256 '{"input": "your data here"}'
Pricing
Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 1 credit per call — that's $0.001. See all pricing tiers.
Related APIs in Crypto & Security
View the full API catalog · Try in playground · Documentation