ODIN_ENDIAN changed to an enum constant; ODIN_ENUM_STRING is the new string version of the old constant

This commit is contained in:
gingerBill
2022-01-15 17:53:18 +00:00
parent 3f59c45740
commit f0529535e0
14 changed files with 64 additions and 45 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ keccakf :: proc "contextless" (st: ^[25]u64) {
t: u64 = ---
bc: [5]u64 = ---
when ODIN_ENDIAN != "little" {
when ODIN_ENDIAN != .Little {
v: uintptr = ---
for i = 0; i < 25; i += 1 {
v := uintptr(&st[i])
@@ -98,7 +98,7 @@ keccakf :: proc "contextless" (st: ^[25]u64) {
st[0] ~= keccakf_rndc[r]
}
when ODIN_ENDIAN != "little" {
when ODIN_ENDIAN != .Little {
for i = 0; i < 25; i += 1 {
v = uintptr(&st[i])
t = st[i]
+1 -1
View File
@@ -1332,7 +1332,7 @@ update :: proc(ctx: ^Haval_Context, data: []byte) {
}
ctx.count[1] += str_len >> 29
when ODIN_ENDIAN == "little" {
when ODIN_ENDIAN == .Little {
if rmd_len + str_len >= 128 {
copy(util.slice_to_bytes(ctx.block[:])[rmd_len:], data[:fill_len])
block(ctx, ctx.rounds)