aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-11-08 12:16:04 +0000
committergingerBill <bill@gingerbill.org>2021-11-08 12:16:04 +0000
commit3d35c5ceb1cedeb75997e9adf68a575cdd30be60 (patch)
treeb19ea3367b4c0d2160096f7a72eecb740170108c
parenta674e842d099e9676bcd9ef54d325876d51f09a1 (diff)
parent39f652de4706f000277b2e6d0018a3e0fa73c67f (diff)
Merge branch 'master' of https://github.com/odin-lang/Odin
-rw-r--r--core/crypto/groestl/groestl.odin4
-rw-r--r--core/crypto/haval/haval.odin6
-rw-r--r--core/crypto/jh/jh.odin4
3 files changed, 7 insertions, 7 deletions
diff --git a/core/crypto/groestl/groestl.odin b/core/crypto/groestl/groestl.odin
index 8c6d73be8..d3e23dc28 100644
--- a/core/crypto/groestl/groestl.odin
+++ b/core/crypto/groestl/groestl.odin
@@ -68,14 +68,14 @@ use_odin :: #force_inline proc() {
@(private)
_create_groestl_ctx :: #force_inline proc(size: _ctx.Hash_Size) {
ctx: Groestl_Context
- _hash_impl.internal_ctx = ctx
- _hash_impl.hash_size = size
#partial switch size {
case ._28: ctx.hashbitlen = 224
case ._32: ctx.hashbitlen = 256
case ._48: ctx.hashbitlen = 384
case ._64: ctx.hashbitlen = 512
}
+ _hash_impl.internal_ctx = ctx
+ _hash_impl.hash_size = size
}
/*
diff --git a/core/crypto/haval/haval.odin b/core/crypto/haval/haval.odin
index 9c52ae1e4..bea799c71 100644
--- a/core/crypto/haval/haval.odin
+++ b/core/crypto/haval/haval.odin
@@ -73,9 +73,6 @@ use_odin :: #force_inline proc() {
@(private)
_create_haval_ctx :: #force_inline proc(size: _ctx.Hash_Size, rounds: u32) {
ctx: Haval_Context
- ctx.rounds = rounds
- _hash_impl.internal_ctx = ctx
- _hash_impl.hash_size = size
#partial switch size {
case ._16: ctx.hashbitlen = 128
case ._20: ctx.hashbitlen = 160
@@ -83,6 +80,9 @@ _create_haval_ctx :: #force_inline proc(size: _ctx.Hash_Size, rounds: u32) {
case ._28: ctx.hashbitlen = 224
case ._32: ctx.hashbitlen = 256
}
+ ctx.rounds = rounds
+ _hash_impl.internal_ctx = ctx
+ _hash_impl.hash_size = size
}
/*
diff --git a/core/crypto/jh/jh.odin b/core/crypto/jh/jh.odin
index 3ff409962..3c48f6666 100644
--- a/core/crypto/jh/jh.odin
+++ b/core/crypto/jh/jh.odin
@@ -68,14 +68,14 @@ use_odin :: #force_inline proc() {
@(private)
_create_jh_ctx :: #force_inline proc(size: _ctx.Hash_Size) {
ctx: Jh_Context
- _hash_impl.internal_ctx = ctx
- _hash_impl.hash_size = size
#partial switch size {
case ._28: ctx.hashbitlen = 224
case ._32: ctx.hashbitlen = 256
case ._48: ctx.hashbitlen = 384
case ._64: ctx.hashbitlen = 512
}
+ _hash_impl.internal_ctx = ctx
+ _hash_impl.hash_size = size
}
/*