X509Certificate.TryGetCertHash 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 de produire une « empreinte » pour le certificat en hachage de la représentation encodée du certificat avec l’algorithme de hachage spécifié.
public:
virtual bool TryGetCertHash(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TryGetCertHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, Span<byte> destination, out int bytesWritten);
abstract member TryGetCertHash : System.Security.Cryptography.HashAlgorithmName * Span<byte> * int -> bool
override this.TryGetCertHash : System.Security.Cryptography.HashAlgorithmName * Span<byte> * int -> bool
Public Overridable Function TryGetCertHash (hashAlgorithm As HashAlgorithmName, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
Paramètres
- hashAlgorithm
- HashAlgorithmName
Algorithme à utiliser pour l’empreinte numérique.
- bytesWritten
- Int32
Lorsque cette méthode retourne, le nombre total d’octets écrits en destination. Ce paramètre est traité comme non initialisé.
Retours
true s’il destination est suffisamment long pour recevoir la valeur de hachage ; sinon, false.
Exceptions
hashAlgorithm.Name est null ou une chaîne vide.
hashAlgorithm n’est pas un algorithme de hachage connu.