core/crypto/mlkem: Fix compiler error on key_size(&Encapsualtion_Key)

This commit is contained in:
Yawning Angel
2026-08-05 18:26:44 +09:00
parent a51cdd43bf
commit 65450b78ab

View File

@@ -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
}