data
body
algorithm
body
# SHA-256 hash
curl -X POST https://tcpdata.com/hash \
-H "Content-Type: application/json" \
-d '{"data":"Hello World","algorithm":"sha256"}'
# SHA-512 hash
curl -X POST https://tcpdata.com/hash \
-H "Content-Type: application/json" \
-d '{"data":"my-secret-data","algorithm":"sha512"}'
const response = await fetch('https://tcpdata.com/hash', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
data: 'Hello World',
algorithm: 'sha256'
})
});
const result = await response.json();
console.log(result.hash);
import requests
response = requests.post('https://tcpdata.com/hash', json={
'data': 'Hello World',
'algorithm': 'sha256'
})
print(response.json()['hash'])