Skip to content

Commit 572cac3

Browse files
committed
Use explicit 64bit type. Fixes #741.
1 parent f8c3584 commit 572cac3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/CryptoSwift/SHA2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ extension SHA2: Updatable {
284284
accumulated += bytes
285285

286286
if isLast {
287-
let lengthInBits = (processedBytesTotalCount + accumulated.count) * 8
287+
let lengthInBits = UInt64((processedBytesTotalCount + accumulated.count) * 8)
288288
let lengthBytes = lengthInBits.bytes(totalBytes: blockSize / 8) // A 64-bit/128-bit representation of b. blockSize fit by accident.
289289

290290
// Step 1. Append padding

0 commit comments

Comments
 (0)