Beispiel #1
0
        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));
        }
Beispiel #2
0
 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.");
 }
Beispiel #3
0
 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);
 }