Need to generate SHA384 hashes in your application? This guide covers everything about SHA-384 hash generation via API, including its place in the SHA-2 family, security benefits, and implementation examples.
What is SHA384?
SHA-384 is a cryptographic hash function from the SHA-2 family that produces a 384-bit (96-character hexadecimal) hash value. It's a truncated version of SHA-512, providing a balance between security and output size.
A SHA384 hash looks like this: 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b
The SHA-2 Family
SHA-2 includes several hash functions with different output sizes:
- SHA-224: 224 bits (truncated SHA-256)
- SHA-256: 256 bits (most widely used)
- SHA-384: 384 bits (truncated SHA-512)
- SHA-512: 512 bits (maximum security)
Using the SHA384 Hash API
TinyFn provides a simple endpoint to generate SHA384 hashes:
POST https://api.tinyfn.io/v1/hash/sha384
Headers: X-API-Key: your-api-key
Content-Type: application/json
{
"input": "Hello, World!"
}
{
"hash": "5485cc9b3365b4305dfb4e8c6a5c6eb8b78e8b05e9c7d94b6e5c7c61a1aa8c2c4e7e52e8e9c0e7e5e8c9c7d5a3b2c1a0",
"algorithm": "sha384",
"input_length": 13
}
Parameters
| Parameter | Type | Description |
|---|---|---|
input |
string | Text to hash (required) |
encoding |
string | Input encoding: "utf8", "base64", "hex" (default: "utf8") |
output_format |
string | Output format: "hex", "base64" (default: "hex") |
Code Examples
JavaScript / Node.js
const response = await fetch(
'https://api.tinyfn.io/v1/hash/sha384',
{
method: 'POST',
headers: {
'X-API-Key': 'your-api-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
input: 'Hello, World!'
})
}
);
const { hash } = await response.json();
console.log(hash); // 96-character hex string
Python
import requests
response = requests.post(
'https://api.tinyfn.io/v1/hash/sha384',
headers={'X-API-Key': 'your-api-key'},
json={'input': 'Hello, World!'}
)
hash_value = response.json()['hash']
print(hash_value) # 96-character hex string
cURL
curl -X POST "https://api.tinyfn.io/v1/hash/sha384" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"input": "Hello, World!"}'
Common Use Cases
- TLS/SSL Certificates: Used in certificate fingerprints and signatures
- Government Applications: Required by many government security standards
- Digital Signatures: Provides strong security for document signing
- Integrity Verification: High-security checksum verification
- Cryptographic Protocols: Used in various security protocols
Best Practices
- Use for high-security needs: SHA-384 when you need more than 128 bits of security
- Consider SHA-256 for general use: SHA-256 is usually sufficient and more widely supported
- Compliance requirements: Use SHA-384 when required by security standards
- Consistent algorithm choice: Stick to one SHA variant within your system
Use via MCP
Your AI agent can call this tool directly via Model Context Protocol — no HTTP code needed. Add TinyFn to Claude Desktop, Cursor, or any MCP client:
{
"mcpServers": {
"tinyfn-hash": {
"url": "https://api.tinyfn.io/mcp/hash/",
"headers": {
"X-API-Key": "your-api-key"
}
}
}
}
See all hash tools available via MCP in our Hash MCP Tools for AI Agents guide.
Try the SHA384 Hash API
Get your free API key and start generating SHA384 hashes in seconds.
Get Free API Key