digest string - part-cw/lambdanative GitHub Wiki

(digest-string str algorithm #!optional result-type)

Returns the digest of the string, using the specified algorithm

Parameter Description
str String to digest
algorithm Algorithm to use: crc32, md5, sha-1, sha-224 or sha-256
result-type Type of result: hex or u8vector

Example

> (digest-string "test" 'crc32)
"d87f7e0c"
> (digest-string "test" 'crc32 'u8vector)
#u8(12 126 127 216)