mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
core/crypto/md5: odinfmt (NFC)
This commit is contained in:
@@ -10,9 +10,9 @@ package md5
|
|||||||
Implementation of the MD5 hashing algorithm, as defined in RFC 1321 <https://datatracker.ietf.org/doc/html/rfc1321>
|
Implementation of the MD5 hashing algorithm, as defined in RFC 1321 <https://datatracker.ietf.org/doc/html/rfc1321>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import "core:io"
|
||||||
import "core:mem"
|
import "core:mem"
|
||||||
import "core:os"
|
import "core:os"
|
||||||
import "core:io"
|
|
||||||
|
|
||||||
import "../util"
|
import "../util"
|
||||||
|
|
||||||
@@ -201,7 +201,8 @@ transform :: proc(ctx: ^Md5_Context, data: []byte) {
|
|||||||
m: [DIGEST_SIZE]u32
|
m: [DIGEST_SIZE]u32
|
||||||
|
|
||||||
for i, j = 0, 0; i < DIGEST_SIZE; i += 1 {
|
for i, j = 0, 0; i < DIGEST_SIZE; i += 1 {
|
||||||
m[i] = u32(data[j]) + u32(data[j + 1]) << 8 + u32(data[j + 2]) << 16 + u32(data[j + 3]) << 24
|
m[i] =
|
||||||
|
u32(data[j]) + u32(data[j + 1]) << 8 + u32(data[j + 2]) << 16 + u32(data[j + 3]) << 24
|
||||||
j += 4
|
j += 4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user