ECDiffieHellmanCng.DeriveKeyFromHash 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.
Effectue une dérivation de clé à l’aide d’un algorithme de hachage spécifié avec des données prédéfinies ou ajoutées facultatives.
public:
override cli::array <System::Byte> ^ DeriveKeyFromHash(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ secretPrepend, cli::array <System::Byte> ^ secretAppend);
public override byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend);
public override byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] secretPrepend, byte[] secretAppend);
override this.DeriveKeyFromHash : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] -> byte[]
Public Overrides Function DeriveKeyFromHash (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, secretPrepend As Byte(), secretAppend As Byte()) As Byte()
Paramètres
- otherPartyPublicKey
- ECDiffieHellmanPublicKey
Clé publique de l’autre partie.
- hashAlgorithm
- HashAlgorithmName
Algorithme de hachage à utiliser pour dériver le matériau de clé.
- secretPrepend
- Byte[]
Valeur à ajouter au secret dérivé avant le hachage.
- secretAppend
- Byte[]
Valeur à ajouter au secret dérivé avant le hachage.
Retours
Hachage du secret partagé après avoir prédéfinie ou ajouté des données comme demandé.
Exceptions
Une classe dérivée doit remplacer cette méthode.
La courbe utilisée par otherPartyPublicKey a une taille différente de la courbe de cette clé.
- ou -
Le hashAlgorithm paramètre ne spécifie pas de hachage.
otherPartyPublicKey a la valeur null.
La courbe utilisée par otherPartyPublicKey est différente de la courbe de cette clé.
- ou -
Cette instance représente uniquement une clé publique.