MD5 module: fixed parameter name

This commit is contained in:
Araq
2015-03-12 16:10:42 +01:00
parent 4077f7d49c
commit 45a7c51f0c

View File

@@ -213,13 +213,13 @@ proc toMD5*(s: string): MD5Digest =
md5Update(c, cstring(s), len(s))
md5Final(c, result)
proc `$`*(D: MD5Digest): string =
proc `$`*(d: MD5Digest): string =
## converts a MD5Digest value into its string representation
const digits = "0123456789abcdef"
result = ""
for i in 0..15:
add(result, digits[(D[i] shr 4) and 0xF])
add(result, digits[D[i] and 0xF])
add(result, digits[(d[i] shr 4) and 0xF])
add(result, digits[d[i] and 0xF])
proc getMD5*(s: string): string =
## computes an MD5 value of `s` and returns its string representation