語言

CompositeMLDsa.TryExportPkcs8PrivateKey(Span<Byte>, Int32) 方法

定義

嘗試將目前的 PKCS#8 PrivateKeyInfo 格式金鑰匯出至提供的緩衝區。

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

參數

destination
Span<Byte>

接收 PKCS#8 PrivateKeyInfo 值的緩衝區。

bytesWritten
Int32

當此方法回傳時,包含寫入緩衝區的 destination 位元組數。

此參數被視為未初始化。

傳回

true如果 destination 足夠大以容納結果;否則,。 false

例外狀況

這個實例已經被處理掉了。

匯出金鑰時發生錯誤。

適用於