generate_hash
Hash a string using SHA-256, SHA-512, SHA-1, MD5, SHA3-256, or BLAKE2b to generate a hex-encoded digest for data integrity verification or content fingerprints.
Instructions
Hash a string with a cryptographic hash algorithm.
Computes the hash server-side and returns hex-encoded digest. Useful for
verifying data integrity, creating content fingerprints, or generating
deterministic identifiers. All algorithms produce consistent, reproducible
output for the same input.
Args:
data: String to hash. Encoded as UTF-8 before hashing.
algorithm: Hash algorithm to use — one of:
'sha256' (default): 256-bit SHA-2, widely used standard.
'sha512': 512-bit SHA-2, stronger but longer output.
'sha1': 160-bit SHA-1, legacy (not collision-resistant).
'md5': 128-bit MD5, legacy (not collision-resistant).
'sha3_256': 256-bit SHA-3 (Keccak), different from SHA-2.
'blake2b': BLAKE2b, fast and cryptographically strong.
Returns:
algorithm: The algorithm used.
hex: Hex-encoded hash digest.
length: Length of the hex string in characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| algorithm | No | sha256 |