encapsulate

open suspend override fun encapsulate(algorithm: KemAlgorithm, publicKey: ByteArray): KemEncapsulation(source)

ML-KEM.Encaps (FIPS 203 Algorithm 20).

Throws

when publicKey fails the type or modulus check (FIPS 203 §7.2).