ECAlgorithm.TryExportECPrivateKeyPem(Span<Char>, Int32) 方法

定義

嘗試將 PEM 編碼 ECPrivateKey 格式的目前金鑰匯出至提供的緩衝區。

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

參數

destination
Span<Char>

要接收 PEM 編碼 ECPrivateKey 資料的字元範圍。

charsWritten
Int32

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

傳回

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

例外狀況

無法匯出金鑰。

備註

PEM 編碼的 ECPrivateKey 會以 開頭 -----BEGIN EC PRIVATE KEY----- ,結尾 -----END EC PRIVATE KEY----- 為 ,且 PEM 界限之間金鑰的 base64 編碼 DER 內容。

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

適用於