public static string ToHash(string plainText, string salt = null, int saltLength = 8, HashAlgorithm algorithm = null) { Hash hash = new Hash(algorithm, saltLength); return(hash.GetHashString(plainText, salt)); }
public void GetHashStringTest() { HashAlgorithm HashAlgorithm = null; // TODO: Initialize to an appropriate value int theSaltLength = 0; // TODO: Initialize to an appropriate value Hash target = new Hash(HashAlgorithm, theSaltLength); // TODO: Initialize to an appropriate value string clearPassword = string.Empty; // TODO: Initialize to an appropriate value string salt = string.Empty; // TODO: Initialize to an appropriate value string expected = string.Empty; // TODO: Initialize to an appropriate value string actual; actual = target.GetHashString(clearPassword, salt); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public static string ToHash(string plainText, string salt=null, int saltLength=8, HashAlgorithm algorithm = null) { Hash hash = new Hash(algorithm, saltLength); return hash.GetHashString(plainText, salt); }