RSA.TryExportRSAPrivateKeyPem(Span<Char>, Int32) 方法

定義

嘗試將 PEM 編碼 PKCS#1 RSAPrivateKey 格式中的目前金鑰匯出至提供的緩衝區。

public:
 bool TryExportRSAPrivateKeyPem(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryExportRSAPrivateKeyPem (Span<char> destination, out int charsWritten);
member this.TryExportRSAPrivateKeyPem : Span<char> * int -> bool
Public Function TryExportRSAPrivateKeyPem (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

參數

destination
Span<Char>

要接收 PEM 編碼 PKCS#1 RSAPrivateKey 資料的字元範圍。

charsWritten
Int32

當這個方法傳回時,會包含值,指出寫入 的 destination 字元數。 這個參數會被視為未初始化。

傳回

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

例外狀況

無法匯出金鑰。

備註

PEM 編碼的 PKCS#1 RSAPrivateKey 會以 開頭 -----BEGIN RSA PRIVATE KEY----- 和結尾 -----END RSA PRIVATE KEY----- ,且 PEM 界限之間金鑰的 base64 編碼 DER 內容。

          The PEM is encoded according to the IETF RFC 7468 "strict"
          encoding rules.

適用於