語言

RSA.TryExportRSAPrivateKey(Span<Byte>, Int32) 方法

定義

嘗試將目前的 PKCS#1 RSAPrivateKey 格式匯出至提供的緩衝區。

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

參數

destination
Span<Byte>

接收 PKCS#1 RSAPrivateKey 資料的位元組區間。

bytesWritten
Int32

當此方法回傳時,包含一個表示寫入 的 destination位元組數的值。 此參數被視為未初始化。

傳回

true如果 destination 足夠大以接收輸出;否則,。 false

例外狀況

該金鑰無法匯出。

適用於

另請參閱