Method | Description | |
---|---|---|
CreateHash ( string password ) : string |
Creates a salted PBKDF2 hash of the password.
|
|
ValidatePassword ( string password, string correctHash ) : bool |
Validates a password given a hash of the correct one.
|
Method | Description | |
---|---|---|
PBKDF2 ( string password, byte salt, int iterations, int outputBytes ) : byte[] |
Computes the PBKDF2-SHA1 hash of a password.
|
|
SlowEquals ( byte a, byte b ) : bool |
Compares two byte arrays in length-constant time. This comparison method is used so that password hashes cannot be extracted from on-line systems using a timing attack and then attacked off-line.
|
public static CreateHash ( string password ) : string | ||
password | string | The password to hash. |
return | string |
public static ValidatePassword ( string password, string correctHash ) : bool | ||
password | string | The password to check. |
correctHash | string | A hash of the correct password. |
return | bool |