Fix types.
This commit is contained in:
parent
80eb5a99b9
commit
ab0adb28da
|
@ -31,7 +31,7 @@ proc digest*[T](HashType: typedesc, data: openarray[T],
|
|||
let eo = if ofinish == -1: uint(len(data)) else: uint(ofinish - so)
|
||||
ctx.init()
|
||||
assert(uint(so) <= eo)
|
||||
assert(eo <= len(data))
|
||||
assert(eo <= uint(len(data)))
|
||||
if eo == 0:
|
||||
result = ctx.finish()
|
||||
else:
|
||||
|
|
|
@ -112,7 +112,7 @@ proc hmac*[A, B](HashType: typedesc, key: openarray[A],
|
|||
let eo = if ofinish == -1: uint(len(data)) else: uint(ofinish - so)
|
||||
ctx.init(cast[ptr uint8](unsafeAddr key[0]), uint(sizeof(A) * len(key)))
|
||||
assert(uint(so) <= eo)
|
||||
assert(eo <= len(data))
|
||||
assert(eo <= uint(len(data)))
|
||||
if eo == 0:
|
||||
result = ctx.finish()
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue