C# Class SecurePasswordHasher, code

Exibir arquivo Open project: shendongnian/code Class Usage Examples

Public Methods

Method Description
Hash ( string password ) : string

Creates a hash from a password with 10000 iterations

Hash ( string password, int iterations ) : string

Creates a hash from a password

IsHashSupported ( string hashString ) : bool

Check if hash is supported

Verify ( string password, string hashedPassword ) : bool

verify a password against a hash

Method Details

Hash() public static method

Creates a hash from a password with 10000 iterations
public static Hash ( string password ) : string
password string the password
return string

Hash() public static method

Creates a hash from a password
public static Hash ( string password, int iterations ) : string
password string the password
iterations int number of iterations
return string

IsHashSupported() public static method

Check if hash is supported
public static IsHashSupported ( string hashString ) : bool
hashString string the hash
return bool

Verify() public static method

verify a password against a hash
public static Verify ( string password, string hashedPassword ) : bool
password string the password
hashedPassword string the hash
return bool