|
@@ -102,13 +102,13 @@ public final class MD5: DigestType {
|
|
|
// break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15 and get M[g] value
|
|
|
let gAdvanced = g << 2
|
|
|
|
|
|
- let mg0 = UInt32(chunk[chunk.startIndex &+ gAdvanced])
|
|
|
- let mg1 = UInt32(chunk[chunk.startIndex &+ gAdvanced &+ 1]) << 8
|
|
|
- let mg2 = UInt32(chunk[chunk.startIndex &+ gAdvanced &+ 2]) << 16
|
|
|
- let mg3 = UInt32(chunk[chunk.startIndex &+ gAdvanced &+ 3]) << 24
|
|
|
- let mg = (mg0 | mg1 | mg2) | mg3
|
|
|
+ let Mg0 = UInt32(chunk[chunk.startIndex &+ gAdvanced])
|
|
|
+ let Mg1 = UInt32(chunk[chunk.startIndex &+ gAdvanced &+ 1]) << 8
|
|
|
+ let Mg2 = UInt32(chunk[chunk.startIndex &+ gAdvanced &+ 2]) << 16
|
|
|
+ let Mg3 = UInt32(chunk[chunk.startIndex &+ gAdvanced &+ 3]) << 24
|
|
|
+ let Mg = (Mg0 | Mg1 | Mg2) | Mg3
|
|
|
|
|
|
- B = B &+ rotateLeft(A &+ F &+ k[j] &+ mg, by: s[j])
|
|
|
+ B = B &+ rotateLeft(A &+ F &+ k[j] &+ Mg, by: s[j])
|
|
|
A = dTemp
|
|
|
}
|
|
|
|