A universal cryptography utility for developers.
Supports hashing, encryption, and decryption with multiple algorithms.
Built for easy GET/POST integration in apps.
๐ Base URL
encryption-hashing-utility-api.p.rapidapi.com
โก Endpoint
GET /crypto
POST /crypto
Perform hashing, encryption, or decryption using the specified algorithm.
๐ฅ Query / JSON Body Parameters
Param | Type | Required | Description |
---|---|---|---|
text |
string | โ Yes | Input plain text (for hashing/encryption) or ciphertext (for decryption). |
algo |
string | โ Yes | Algorithm to use. Supported: sha256 , sha512 , md5 , bcrypt , argon2 , blake2b , blake2s , aes , rsa , blowfish , chacha20 . |
action |
string | โ No | One of: hash (default for hash algos), encrypt , decrypt . Default: encrypt . |
key |
string | โ ๏ธ Depends | Required for encryption/decryption (aes , rsa , blowfish , chacha20 ). Not needed for hash. |
iv |
string | โ ๏ธ Depends | Required (Base64) when decrypting AES or Blowfish . |
nonce |
string | โ ๏ธ Depends | Required (Base64) when decrypting ChaCha20 . |
๐ Supported Algorithms
Hashing
sha256
sha512
md5
bcrypt
argon2
blake2b
blake2s
Encryption / Decryption
-
AES
(CBC mode, Base64 encoded ciphertext + IV) -
RSA
(PKCS1_OAEP, PEM keys required) -
Blowfish
(CBC mode, Base64 encoded ciphertext + IV) -
ChaCha20
(Base64 encoded ciphertext + Nonce)
๐ Example Requests & Responses
1. Hashing (SHA256)
Request
GET /crypto?text=hello&algo=sha256&action=hash
Response
{
"algorithm": "sha256",
"action": "hash",
"result": "2cf24dba5fb0a30e26e83b2ac5b9e29e..."
}
2. Hashing (Argon2)
Request
POST /crypto
{
"text": "mypassword",
"algo": "argon2",
"action": "hash"
}
Response
{
"algorithm": "argon2",
"action": "hash",
"result": "$argon2id$v=19$m=65536,t=3,p=4$..."
}
3. AES Encrypt
Request
POST /crypto
{
"text": "secret data",
"algo": "aes",
"action": "encrypt",
"key": "mysecretkey123"
}
Response
{
"algorithm": "AES",
"action": "encrypt",
"result": {
"ciphertext": "4tD5a8l1oG+Q6...",
"iv": "jhs78J9n0sdh=="
}
}
4. AES Decrypt
Request
POST /crypto
{
"text": "4tD5a8l1oG+Q6...",
"algo": "aes",
"action": "decrypt",
"key": "mysecretkey123",
"iv": "jhs78J9n0sdh=="
}
Response
{
"algorithm": "AES",
"action": "decrypt",
"result": "secret data"
}
5. RSA Encrypt
Request
POST /crypto
{
"text": "hidden message",
"algo": "rsa",
"action": "encrypt",
"key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq...\n-----END PUBLIC KEY-----"
}
Response
{
"algorithm": "RSA",
"action": "encrypt",
"result": "Lk23a9hdJd+Skj2..."
}
6. Blowfish Encrypt
Request
POST /crypto
{
"text": "legacy data",
"algo": "blowfish",
"action": "encrypt",
"key": "legacyKey"
}
Response
{
"algorithm": "Blowfish",
"action": "encrypt",
"result": {
"ciphertext": "8shd9sk32==",
"iv": "9dsh6sdh=="
}
}
7. ChaCha20 Encrypt
Request
POST /crypto
{
"text": "fast crypto",
"algo": "chacha20",
"action": "encrypt",
"key": "superstreamkey123"
}
Response
{
"algorithm": "ChaCha20",
"action": "encrypt",
"result": {
"ciphertext": "ab29dshJDs==",
"nonce": "2sd8hs72=="
}
}
โ ๏ธ Error Handling
Examples of possible errors:
Missing Parameters
{
"error": "Missing required params: text, algo"
}
Unsupported Algorithm
{
"error": "Unsupported algorithm"
}
Decryption Failure
{
"error": "RSA decryption failed. Ensure correct private key & ciphertext"
}
๐ก๏ธ Security Notes
- Always keep keys private & secure.
-
bcrypt
andargon2
are best for password storage. -
RSA
requires proper PEM-formatted keys. - Never log plaintext or keys in production apps.
Top comments (0)