Pkcs12Builder.TryEncode(Span<Byte>, Int32) 方法

定义

尝试将密封 PFX 的内容编码为提供的缓冲区。

public:
 bool TryEncode(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryEncode(Span<byte> destination, out int bytesWritten);
member this.TryEncode : Span<byte> * int -> bool
Public Function TryEncode (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

参数

destination
Span<Byte>

用于接收 PKCS#12 PFX 数据的字节范围。

bytesWritten
Int32

此方法返回时,包含一个值,该值指示写入到 destination的字节数。 此参数被视为未初始化。

返回

true 如果 destination 足够大才能接收输出,则为 ;否则为 false

例外

PFX 未密封(IsSealedfalse)。

适用于