make openssl.nim compile again
This commit is contained in:
parent
3308d26581
commit
7016a8f57d
1 changed files with 9 additions and 9 deletions
|
|
@ -614,11 +614,11 @@ proc md5_File* (file: string): string {.raises: [IOError,Exception].} =
|
||||||
discard md5_final(buf[0].addr, ctx)
|
discard md5_final(buf[0].addr, ctx)
|
||||||
f.close
|
f.close
|
||||||
|
|
||||||
result = hexStr(buf)
|
result = hexStr(addr buf)
|
||||||
|
|
||||||
proc md5_Str*(str: string): string =
|
proc md5_Str*(str: string): string =
|
||||||
## Generate MD5 hash for a string. Result is a 32 character
|
## Generate MD5 hash for a string. Result is a 32 character
|
||||||
#hex string with lowercase characters
|
## hex string with lowercase characters
|
||||||
var
|
var
|
||||||
ctx: MD5_CTX
|
ctx: MD5_CTX
|
||||||
res: array[MD5_DIGEST_LENGTH,char]
|
res: array[MD5_DIGEST_LENGTH,char]
|
||||||
|
|
@ -631,5 +631,5 @@ proc md5_Str*(str:string): string =
|
||||||
discard md5_update(ctx, input[i].addr, L)
|
discard md5_update(ctx, input[i].addr, L)
|
||||||
i += L
|
i += L
|
||||||
|
|
||||||
discard md5_final(res,ctx)
|
discard md5_final(addr res, ctx)
|
||||||
result = hexStr(res)
|
result = hexStr(addr res)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue