语言

MLKem.Encapsulate 方法

定义

创建封装密码文本和共享机密。

重载

名称 说明
Encapsulate(Byte[], Byte[])

创建封装密码文本和共享机密。

Encapsulate(Span<Byte>, Span<Byte>)

创建封装密码文本和共享机密,将其写入提供的缓冲区。

Encapsulate(Byte[], Byte[])

Source:
MLKem.cs
Source:
MLKem.cs
Source:
MLKem.cs

创建封装密码文本和共享机密。

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())

参数

ciphertext
Byte[]

此方法返回时,包含密码文本。

sharedSecret
Byte[]

此方法返回时,包含共享机密。

例外

封装期间发生错误。

对象已释放。

适用于

Encapsulate(Span<Byte>, Span<Byte>)

Source:
MLKem.cs
Source:
MLKem.cs
Source:
MLKem.cs

创建封装密码文本和共享机密,将其写入提供的缓冲区。

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))

参数

ciphertext
Span<Byte>

要接收密码文本的缓冲区。

sharedSecret
Span<Byte>

用于接收共享机密的缓冲区。

例外

封装期间发生错误。

- 或者 -

ciphertext 与 sharedSecret..

ciphertext 大小不正确。

-或者-

sharedSecret 大小不正确。

对象已释放。

适用于