MLKem.Encapsulate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Encapsulate(Byte[], Byte[]) |
Creates an encapsulation ciphertext and shared secret. |
| Encapsulate(Span<Byte>, Span<Byte>) |
Creates an encapsulation ciphertext and shared secret, writing them into the provided buffers. |
Encapsulate(Byte[], Byte[])
- Source:
- MLKem.cs
- Source:
- MLKem.cs
Creates an encapsulation ciphertext and shared secret.
public:
void Encapsulate([Runtime::InteropServices::Out] cli::array <System::Byte> ^ % ciphertext, [Runtime::InteropServices::Out] cli::array <System::Byte> ^ % sharedSecret);
public void Encapsulate(out byte[] ciphertext, out byte[] sharedSecret);
member this.Encapsulate : Byte[] * Byte[] -> unit
Public Sub Encapsulate (ByRef ciphertext As Byte(), ByRef sharedSecret As Byte())
Parameters
- ciphertext
- Byte[]
When this method returns, contains the ciphertext.
- sharedSecret
- Byte[]
When this method returns, contains the shared secret.
Exceptions
An error occurred during encapsulation.
The object has already been disposed.
Applies to
Encapsulate(Span<Byte>, Span<Byte>)
- Source:
- MLKem.cs
- Source:
- MLKem.cs
Creates an encapsulation ciphertext and shared secret, writing them into the provided buffers.
public:
void Encapsulate(Span<System::Byte> ciphertext, Span<System::Byte> sharedSecret);
public void Encapsulate(Span<byte> ciphertext, Span<byte> sharedSecret);
member this.Encapsulate : Span<byte> * Span<byte> -> unit
Public Sub Encapsulate (ciphertext As Span(Of Byte), sharedSecret As Span(Of Byte))
Parameters
Exceptions
An error occurred during encapsulation.
-or -
ciphertext overlaps with sharedSecret.
The object has already been disposed.