SHA-2, SHA-3, BLAKE2 and HMAC digests of supplied text or base64 bytes
code_hashCompute a cryptographic digest of supplied data: SHA-256, SHA-384, SHA-512, SHA-1, SHA3-256, SHA3-512, Keccak-256, BLAKE2b-256 and BLAKE2b-512, plus HMAC with any of them. Input is UTF-8 text, base64 or hex bytes; output is hex, base64, base64url or base32. Returns the digest, the byte length of the input, and the exact algorithm identifier used. Price: $0.05 per successful call, paid over x402 (USDC on Base).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | No | Digest output encoding: hex (default), base64, base64url or base32. Accepted: hex, base64, base64url, base32. | |
| algo | Yes | Digest algorithm. Accepted: sha256, sha384, sha512, sha1, sha3-256, sha3-512, keccak256, blake2b-256, blake2b-512. | |
| data | Yes | Input data, interpreted per encoding. At most 8192 characters. An empty value hashes the empty string. Accepted: at most 8192 characters. | |
| encoding | No | Encoding of data: utf8 (default), base64, base64url or hex. Accepted: utf8, base64, base64url, hex. | |
| hmac_key | No | If present, computes HMAC with this key. Accepted: at most 512 characters. | |
| hmac_key_encoding | No | Encoding of hmac_key, as encoding. Accepted: utf8, base64, base64url, hex. |