mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 09:44:26 +00:00
core/crypto/mlkem: Fix compiler error on key_size(&Encapsualtion_Key)
This commit is contained in:
@@ -269,7 +269,7 @@ params :: proc(k: ^$T) -> Parameters where (T == Encapsulation_Key || T == Decap
|
||||
@(require_results)
|
||||
key_size :: proc(k: ^$T) -> int where (T == Encapsulation_Key || T == Decapsulation_Key) {
|
||||
when T == Encapsulation_Key {
|
||||
return ENCAPSULATION_KEY_SIZES[k.pke_ek.k]
|
||||
return ENCAPSULATION_KEY_SIZES[params(k)]
|
||||
} else {
|
||||
return DECAPSULATION_KEY_SEED_SIZE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user