Hash
The /hash endpoint converts a string into a hash, i.e. a string of characters that cannot be reversed into the original string.
POST/v3/hash
Parameters
| Parameter | Required | Description |
|---|---|---|
text | Yes | The string to hash (word, sentence, paragraph, etc.) |
method | Yes | The hashing method to use (see available methods below) |
Available Methods
Click to expand all available hashing methods
RSA Methods:
RSA-MD5RSA-RIPEMD160RSA-SHA1RSA-SHA1-2RSA-SHA224RSA-SHA256RSA-SHA3-224RSA-SHA3-256RSA-SHA3-384RSA-SHA3-512RSA-SHA384RSA-SHA512RSA-SHA512/224RSA-SHA512/256RSA-SM3
Blake Methods:
blake2b512blake2s256
SHA Methods:
sha1sha224sha256sha384sha512sha512-224sha512-256sha3-224sha3-256sha3-384sha3-512
MD5 Methods:
md5md5-sha1md5WithRSAEncryption
RIPEMD Methods:
ripemdripemd160ripemd160WithRSArmd160
Other Methods:
shake128shake256sm3sm3WithRSAEncryptionssl3-md5ssl3-sha1
RSA Encryption Methods:
sha1WithRSAEncryptionsha224WithRSAEncryptionsha256WithRSAEncryptionsha384WithRSAEncryptionsha512WithRSAEncryptionsha512-224WithRSAEncryptionsha512-256WithRSAEncryption
PKCS Methods:
id-rsassa-pkcs1-v1_5-with-sha3-224id-rsassa-pkcs1-v1_5-with-sha3-256id-rsassa-pkcs1-v1_5-with-sha3-384id-rsassa-pkcs1-v1_5-with-sha3-512
Request Example
bash
curl -X POST -d "text=hello&method=sha512" "https://api.sylvain.pro/v3/hash"Response
json
{
"method": "sha512",
"hash": "9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043"
}Error Handling
If parameters are missing or invalid, the API will return an error:
| Error Message | Description |
|---|---|
Please provide a text (?text={text}) | The text parameter is missing |
Please provide a valid hash algorithm (&method={algorithm}) | The method parameter is missing or invalid |