ECDiffieHellmanCng.DeriveKeyFromHash Metoda

Definicja

Wykonuje wyprowadzanie klucza przy użyciu określonego algorytmu wyznaczania wartości skrótu z opcjonalnymi danymi wstępnie dodanymi lub dołączonymi.

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()

Parametry

otherPartyPublicKey
ECDiffieHellmanPublicKey

Klucz publiczny drugiej strony.

hashAlgorithm
HashAlgorithmName

Algorytm skrótu używany do uzyskiwania materiału klucza.

secretPrepend
Byte[]

Wartość, która ma poprzedzać pochodny wpis tajny przed utworzeniem skrótu.

secretAppend
Byte[]

Wartość, która ma być dołączana do pochodnego wpisu tajnego przed utworzeniem skrótu.

Zwraca

Byte[]

Skrót wspólnego wpisu tajnego po wstępnego dołączania lub dołączania danych zgodnie z żądaniem.

Wyjątki

Klasa pochodna musi zastąpić tę metodę.

Krzywa używana przez otherPartyPublicKey program ma inny rozmiar niż krzywa od tego klucza.

-lub-

Parametr hashAlgorithm nie określa skrótu.

otherPartyPublicKey to null.

Krzywa używana przez otherPartyPublicKey element jest inna niż krzywa od tego klucza.

-lub-

To wystąpienie reprezentuje tylko klucz publiczny.

Dotyczy