Encryption Decryption Toolkit
Cryptographic utility for generating random values, hashing data, computing HMACs, creating digital signatures, and performing AES-256-GCM encryption/decryption.
Actions
generate
Generate a cryptographically secure random value.
Required fields:
generation_type(string) — Type of value to generate:ASCII,BASE64,HEX, orUUIDproperty_name(string) — Name for the output property containing the generated value
Optional fields:
length(integer, 4-256, default 32) — Length of the generated value (ignored for UUID)
Example — Generate a hex API key:
{
"action": "generate",
"property_name": "api_key",
"generation_type": "HEX",
"length": 64
}
Example — Generate a UUID:
{
"action": "generate",
"property_name": "session_id",
"generation_type": "UUID"
}
Example — Generate a base64 token:
{
"action": "generate",
"property_name": "refresh_token",
"generation_type": "BASE64",
"length": 48
}
hash
Compute a cryptographic hash of text or binary data.
Required fields:
hash_algorithm(string) — Hash algorithm:MD5,SHA256,SHA384,SHA512,SHA3-256,SHA3-384, orSHA3-512value(string) — Text to hash (required unlessbinary_fileis true)
Optional fields:
property_name(string) — Output property name (defaults tohash_result)encoding(string) — Output encoding:hex(default) orbase64binary_file(boolean, default false) — Set to true to hash binary data instead of textbinary_value_base64(string) — Base64-encoded binary data (required whenbinary_fileis true)binary_property_name(string) — Metadata label for the binary input
Example — SHA-256 hash of text:
{
"action": "hash",
"hash_algorithm": "SHA256",
"value": "hello world"
}
Example — Hash binary data with base64 output:
{
"action": "hash",
"hash_algorithm": "SHA512",
"binary_file": true,
"binary_value_base64": "SGVsbG8gV29ybGQ=",
"encoding": "base64"
}
Example — MD5 hash with custom property name:
{
"action": "hash",
"hash_algorithm": "MD5",
"value": "check this content",
"property_name": "content_checksum"
}
hmac
Compute a keyed-hash message authentication code.
Required fields:
hash_algorithm(string) — Hash algorithm:MD5,SHA256,SHA384,SHA512,SHA3-256,SHA3-384, orSHA3-512secret(string) — The secret key for HMAC computationvalue(string) — Text to authenticate (required unlessbinary_fileis true)
Optional fields:
property_name(string) — Output property name (defaults tohmac_result)encoding(string) — Output encoding:hex(default) orbase64binary_file(boolean, default false) — Set to true to use binary data as inputbinary_value_base64(string) — Base64-encoded binary data (required whenbinary_fileis true)
Example — HMAC-SHA256:
{
"action": "hmac",
"hash_algorithm": "SHA256",
"value": "message to authenticate",
"secret": "my-secret-key"
}
Example — HMAC-SHA512 with base64 output:
{
"action": "hmac",
"hash_algorithm": "SHA512",
"value": "webhook payload content",
"secret": "webhook-signing-secret",
"encoding": "base64"
}
sign
Create a digital signature using a private key.
Required fields:
value(string) — The text to signalgorithm(string) — Signing algorithm:RS256,RS512(RSA), orES256,ES384,ES512(ECDSA)private_key(string) — PEM-encoded private key
Optional fields:
property_name(string) — Output property name (defaults tosignature)encoding(string) — Output encoding:hex(default) orbase64
Example — RSA SHA-256 signature:
{
"action": "sign",
"value": "data to sign",
"algorithm": "RS256",
"private_key": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----",
"encoding": "base64"
}
Example — ECDSA signature:
{
"action": "sign",
"value": "data to sign",
"algorithm": "ES256",
"private_key": "-----BEGIN EC PRIVATE KEY-----\n...\n-----END EC PRIVATE KEY-----"
}
encrypt
Encrypt plaintext using AES-256-GCM authenticated encryption.
Required fields:
value(string) — Plaintext to encryptkey(string) — 32-byte AES key, encoded as hex or base64iv(string) — 12-byte nonce/initialization vector, encoded as hex or base64
Optional fields:
encoding(string) — Encoding for key, iv, and output:hex(default) orbase64aad(string) — Additional authenticated data (verified during decryption but not encrypted)
Example — Encrypt with hex-encoded key and IV:
{
"action": "encrypt",
"value": "secret message",
"key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"iv": "0123456789abcdef01234567"
}
Example — Encrypt with AAD:
{
"action": "encrypt",
"value": "confidential data",
"key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"iv": "0123456789abcdef01234567",
"aad": "user-id:12345"
}
decrypt
Decrypt AES-256-GCM ciphertext back to plaintext.
Required fields:
value(string) — Ciphertext to decrypt (hex or base64 encoded)key(string) — 32-byte AES key (same encoding used during encryption)iv(string) — 12-byte nonce (same value used during encryption)
Optional fields:
encoding(string) — Encoding for key, iv, and ciphertext:hex(default) orbase64aad(string) — Additional authenticated data (must match what was used during encryption)
Example — Decrypt hex-encoded ciphertext:
{
"action": "decrypt",
"value": "a1b2c3d4e5f6...",
"key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"iv": "0123456789abcdef01234567"
}
Common Workflows
Generate a key, encrypt, then decrypt
- Use
generatewithgeneration_type: "HEX"andlength: 64to create a 32-byte key - Use
generatewithgeneration_type: "HEX"andlength: 24to create a 12-byte IV - Use
encryptwith the generated key, IV, and your plaintext - Use
decryptwith the same key, IV, and the returned ciphertext
Verify data integrity with HMAC
- Sender computes
hmacon the message with a shared secret - Receiver computes
hmacon the received message with the same secret - Compare the two HMAC values — if they match, the message is authentic and unaltered
Hash a file for checksums
- Base64-encode the file contents
- Use
hashwithbinary_file: trueandbinary_value_base64set to the encoded content
Important Notes
- Encoding consistency: The
encodingparameter applies to both input decoding (key, iv, ciphertext) and output encoding. Use the same encoding for encrypt and decrypt operations. - Key sizes: AES-256-GCM requires exactly a 32-byte key (64 hex characters or 44 base64 characters).
- IV/nonce: Must be 12 bytes (24 hex characters). Never reuse an IV with the same key.
- Hash algorithms: SHA384 is supported directly (legacy SHA385 alias also accepted internally).
- UUID generation: The
lengthparameter is ignored when generation_type is UUID; standard UUIDs are always returned. - property_name: Controls the key name in the response JSON where the result appears. Useful for chaining outputs in workflows.







