public static bool Sha256Compare(string compare, string hash) { var hasher = new Hasher(HashProvider.SHA256); return hasher.Compare(compare, hash); }
/// <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 bool MD5Compare(string compare, string hash) { var hasher = new Hasher(HashProvider.MD5); return hasher.Compare(compare, hash); }