POSTHash hesapla / doğrula
https://dev.sifrele.net/api/v1/hash/lookupİSTEK ŞEMASI
Content-Type: application/json
| Alan | Tip | Durum | Açıklama |
|---|---|---|---|
| algorithm | md5sha1sha256 | zorunlu | Hash algoritması (allowlist) |
| value | string | zorunlu | Hash'lenecek metin (max 8192 karakter) (max 8192) |
| expected_hash | string | opsiyonel | Opsiyonel: digest ile karşılaştır, matched döner |
Örnek istek
request.json
json
| 1 | { |
| 2 | 0"algorithm" 2"sha256", |
| 3 | 0"value" 2"hello" |
| 4 | } |
Örnek yanıt
response.json
json
| 1 | { |
| 2 | 0"data" 2{ |
| 3 | 0"algorithm" 2"sha256", |
| 4 | 0"digest" 2"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", |
| 5 | 0"length" 25, |
| 6 | 0"matched" 2null |
| 7 | 0} |
| 8 | } |
terminal
bash
| 1 | curl -X POST "https://dev.sifrele.net/api/v1/hash/lookup" \ |
| 2 | -H "Authorization: Bearer sfn_live_..." \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{"algorithm":"sha256","value":"hello"}' |