Skip to content
Chris Petersen edited this page Sep 18, 2015 · 1 revision

Returns the digest of the file, using the specified algorithm

Parameter Description
filename Name of file 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-file "test.txt" 'sha-256)                             
"f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2"
> (digest-file "test.txt" 'sha-256 'u8vector)
#u8(242 202 27 182 199 233 7 208 109 175 228 104 126 87 159 206 118 179 126 78 147 183 96 80 34 218 82 230 204 194 111 210)
Clone this wiki locally