crypt.hash
Computes a hash and returns lowercase hexadecimal text.
Algorithm names are case-sensitive. This returns hex, unlike the Base64 result of crypt.hmac.
crypt.hash(data: string, algorithm: string?): stringParameters
| Parameter | Type | Description |
|---|---|---|
data | string | Raw input bytes. |
algorithm | string? | Defaults to sha256; also sha224, sha384, sha512, sha1 and md5. |
Errors: Unknown algorithm names raise an error.
