AsymmetricAlgorithm.TryExportSubjectPublicKeyInfoPem Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Tente d’exporter la clé actuelle au format X.509 SubjectPublicKeyInfo encodé en PEM dans une mémoire tampon fournie.
public:
bool TryExportSubjectPublicKeyInfoPem(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryExportSubjectPublicKeyInfoPem (Span<char> destination, out int charsWritten);
member this.TryExportSubjectPublicKeyInfoPem : Span<char> * int -> bool
Public Function TryExportSubjectPublicKeyInfoPem (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean
Paramètres
Étendue de caractères pour recevoir les données X.509 SubjectPublicKeyInfo codées au format 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 étant non initialisé.
Retours
true
si destination
est suffisamment grand pour recevoir la sortie ; sinon, false
.
Exceptions
Aucune implémentation TryExportSubjectPublicKeyInfo(Span<Byte>, Int32) n’a été fournie.
La clé n’a pas pu être exportée.
Remarques
A PEM-encoded X.509 SubjectPublicKeyInfo will begin with
-----BEGIN PUBLIC KEY-----
and end with
-----END PUBLIC KEY-----
, with the base64 encoded DER
contents of the key between the PEM boundaries.
The PEM is encoded according to the IETF RFC 7468 "strict"
encoding rules.