Esempio n. 1
0
 public static new bool Sha256Compare(string compare, string hash)
 {
     var hasher = new SaltedHasher(HashProvider.SHA256);
     return hasher.Compare(compare, hash);
 }
Esempio n. 2
0
 /// <summary>
 /// Compares a string to a hash to see if they match
 /// </summary>
 /// <param name="compare">String to hash and compare</param>
 /// <param name="hash">Expected hash result</param>
 /// <returns>true if they match, otherwise false</returns>
 public static new bool MD5Compare(string compare, string hash)
 {
     var hasher = new SaltedHasher(HashProvider.MD5);
     return hasher.Compare(compare, hash);
 }