prepared stdlb for new integer arithmetic rules
This commit is contained in:
parent
e7bcadaf32
commit
12af4a3f8a
2 changed files with 8 additions and 8 deletions
|
|
@ -148,13 +148,13 @@ proc sha1(src: cstring; len: int): Sha1Digest =
|
|||
while lastBlockBytes < endCurrentBlock:
|
||||
|
||||
var value = uint32(src[lastBlockBytes + currentBlock]) shl
|
||||
((3'u32 - (lastBlockBytes and 3)) shl 3)
|
||||
((3'u32 - uint32(lastBlockBytes and 3)) shl 3)
|
||||
|
||||
w[lastBlockBytes shr 2] = w[lastBlockBytes shr 2] or value
|
||||
inc(lastBlockBytes)
|
||||
|
||||
w[lastBlockBytes shr 2] = w[lastBlockBytes shr 2] or (
|
||||
0x80'u32 shl ((3'u32 - (lastBlockBytes and 3)) shl 3)
|
||||
0x80'u32 shl ((3'u32 - uint32(lastBlockBytes and 3)) shl 3)
|
||||
)
|
||||
|
||||
if endCurrentBlock >= 56:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue