encapsulate

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

Encapsulates a fresh shared secret to the encapsulation key publicKey (FIPS 203 §7.2). The caller owns the result and destroys it once it has the secret.