ECAlgorithm.TryExportECPrivateKeyPem(Span<Char>, Int32) Méthode

Définition

Tente d’exporter la clé actuelle au format ECPrivateKey encodé en PEM dans une mémoire tampon fournie.

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

Paramètres

destination
Span<Char>

Étendue de caractères pour recevoir les données ECPrivateKey encodées par PEM.

charsWritten
Int32

Lorsque cette méthode est retournée, contient une valeur qui indique le nombre de caractères écrits dans destination. Ce paramètre est traité comme non initialisé.

Retours

true s’il destination est assez grand pour recevoir la sortie ; sinon, false.

Exceptions

Impossible d’exporter la clé.

Remarques

Une clé ECPrivateKey codée en PEM commence par -----BEGIN EC PRIVATE KEY----- et se termine -----END EC PRIVATE KEY-----par , avec le contenu DER codé en base64 de la clé entre les limites PEM.

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

S’applique à