IHashService

Namespace: ASPSecurityKit
Assembly: ASPSecurityKit.dll

Summary

Provides an interface to implement password hashing operations using algorithm of choice.

Methods

CreateHash(password)

Summary

Creates a hash of the specified password.

Returns

A hash of the specified password.

Parameters
Name Type Description
password System.String The password.

ValidatePassword(password,goodHash)

Summary

Validates whether the specified password is the same as the one the given hash represents.

Returns

true if the specified password is the same as the one the given hash represents; otherwise, false.

Parameters
Name Type Description
password System.String The password to validate.
goodHash System.String A hash of the password to compare with.
Exceptions
Type Description
System.ArgumentException When goodHash isn’t in a valid format required by the hashing algorithm.