Generate SHA-1 cryptographic hashes from text input using GET /v1/hash/sha1 or MCP in Cursor and other AI editors. Returns a 40-character hexadecimal string like "da39a3ee5e6b4b0d3255bfef95601890afd80709" for empty input. While SHA-1 is deprecated for security-critical applications, it remains useful for checksums and legacy system integration.
curl "https://tinyfn.io/v1/hash/sha1" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/hash/sha1', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/hash/sha1',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's hash tools:
{
"mcpServers": {
"tinyfn-hash": {
"url": "https://tinyfn.io/mcp/hash",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Use the hash_sha1 MCP tool with your text input. The AI agent will return the 40-character hex hash directly without you needing to call external APIs.
Returns a 40-character lowercase hexadecimal string. For example, "hello" produces "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d".
No, SHA-1 is cryptographically broken and unsuitable for passwords or digital signatures. Use for checksums, git commits, or legacy system compatibility only.
The endpoint accepts text input which gets UTF-8 encoded before hashing. For binary data, encode it as base64 or hex first.
SHA-1 produces 160-bit (40 hex chars) hashes and is deprecated due to collision vulnerabilities. SHA-256 produces 256-bit (64 hex chars) hashes and remains secure.