methodTstMLKEMPublicKey.Encapsulate
function Encapsulate(out aSharedSecretKey : iSecretKey; aCipherTextFormat: tStringFormat = sfBinary) : AnsiString;
The function Encapsulate corresponds to Algorithm 20 ML-KEM.Encaps from FIPS 203. The input ML-KEM encapsulation key is used together with an approved random generator, to generate a Shared Secret Key, and a cipher text of this shared secret. The cipher text is the return value of the function, and it is supposed to be sent, together with the content cipher text, to the owner of the corresponding ML-KEM private key. The shared secret key is return in the aSharedSecretKey parameter.