ECDiffieHellmanCng.HashAlgorithm Propiedad

Definición

Obtiene o establece el algoritmo hash que se utiliza al generar el material de clave.

public:
 property System::Security::Cryptography::CngAlgorithm ^ HashAlgorithm { System::Security::Cryptography::CngAlgorithm ^ get(); void set(System::Security::Cryptography::CngAlgorithm ^ value); };
public System.Security.Cryptography.CngAlgorithm HashAlgorithm { get; set; }
member this.HashAlgorithm : System.Security.Cryptography.CngAlgorithm with get, set
Public Property HashAlgorithm As CngAlgorithm

Valor de propiedad

Objeto que especifica el algoritmo hash.

Excepciones

El valor es null.

Comentarios

Los objetos Cryptography Next Generation (CNG) usan esta propiedad solo si el Hash valor o Hmac está establecido en la KeyDerivationFunction propiedad .

Esta propiedad acepta los algoritmos siguientes: MD5, Sha1, Sha256, Sha384y Sha512.

También se pueden usar otros algoritmos hash personalizados.

Debido a problemas de colisión con MD5 y SHA1, Microsoft recomienda Sha256. El algoritmo predeterminado es Sha256.

Se aplica a