AsymmetricAlgorithm.ExportPkcs8PrivateKeyPem Méthode

Définition

Exporte la clé actuelle au format PKCS#8 PrivateKeyInfo, encodé en PEM.

C#
public string ExportPkcs8PrivateKeyPem();

Retours

Chaîne contenant le PKCS#8 PrivateKeyInfo encodé en PEM.

Exceptions

La clé n’a pas pu être exportée.

Remarques

Un PrivateKeyInfo codé en PEM PKCS#8 commence par -----BEGIN PRIVATE KEY----- et se termine par -----END PRIVATE KEY-----, 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 à

Produit Versions
.NET 7, 8, 9