RSA.TryExportRSAPrivateKeyPem(Span<Char>, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試將目前的金鑰以 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
參數
- charsWritten
- Int32
當此方法返回時,包含一個表示寫入 的 destination字元數的值。 此參數被視為未初始化。
傳回
true如果 destination 足夠大以接收輸出;否則,。 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.