Hash Function

Generate a hash value (message digest) and return a string containing the calculated message digest from md2 to haval256,5 as lowercase hexits.

< / >

Hash Function API Documentation

< / >

You sould know available hash functions before you can use this API. You can fetch list of available functions via GET request to:

GET https://www.ditatompel.com/api/hashes

Example results :

{
  "success": 1,
  "status": "ok",
  "message": "Query success",
  "data": [
    "md2",
    "md4",
    "md5",
    "sha1",
    "sha224",
    "sha256",
    "sha512",
    [snip...]
  ]
}

Main Request

This endpoint return a string containing the calculated message digest.

POST https://www.ditatompel.com/api/hash/[HASH_FUNCTION]

Parameter

These parameters should be in the query string.

[HASH_FUNCTION] string, required. Hash function you want to use from available functions above.
string string, required. Post param key 'string' is the string you want to calculate.

Example:

 curl https://www.ditatompel.com/api/hash/md2 -XPOST -F 'string=admin' -sL

Response Header

The response header includes the HTTP status code and the content-type. Clients that receive a status code other than HTTP 200 and content-type other than application/json must back-off.

HTTP 200
content-type: application/json

Response Body

The response body includes the information of set of information about input string hash function and calculated message digest. Example of result :

{
  "success": 1,
  "status": "ok",
  "message": "Query success",
  "data": {
    "input": "admin",
    "function": "md2",
    "hash": "3e3e6b0e5c1c68644fc5ce3cf060211d"
  }
}

Ratelimits

In addition, I added custom headers x-ditatompel-rate-limit-* to limit users from making excessive queries to the server.

  • x-ditatompel-rate-limit-limit: Your IP address initial quota for given period.
  • x-ditatompel-rate-limit-remaining: Approximate number of requests left to use.
  • x-ditatompel-rate-limit-reset: Approximate number of seconds to end of period.
Loading...

Loading...