共用方式為


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 的位元組數。 這個參數會被視為未初始化。

傳回

destination 夠大可接收輸出,則為 true;否則為 false

例外狀況

PFX 未密封 (IsSealedfalse)。

適用於