Share via


IHashProvider.CompareHash Method

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Compares plain text input with a computed hash.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Security.Cryptography
Assembly:  Microsoft.Practices.EnterpriseLibrary.Security.Cryptography (in Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll)

Syntax

'Declaration
FunctionCompareHash ( _
    plaintextAs Byte(), _
    hashedtextAs Byte() _
) As Boolean
bool CompareHash(
    byte[] plaintext,
    byte[] hashedtext
)
bool CompareHash(
    array<unsigned char>^ plaintext, 
    array<unsigned char>^ hashedtext
)
functionCompareHash(
    plaintext : byte[], 
    hashedtext : byte[]
) : boolean

Parameters

  • plaintext
    Type: array<System.Byte>
    The input for which you want to compare the hash to.
  • hashedtext
    Type: array<System.Byte>
    The hash value for which you want to compare the input to.

Return Value

true if plainText hashed is equal to the hashedText. Otherwise, false.

See Also

IHashProvider Interface

Microsoft.Practices.EnterpriseLibrary.Security.Cryptography Namespace

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.