Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string username = "bryan";
- string password = "test";
- HMACMD5 stage1 = new HMACMD5(Encoding.ASCII.GetBytes(username));
- byte[] hash1 = stage1.ComputeHash(Encoding.ASCII.GetBytes(password));
- ASCIIEncoding encode1 = new ASCIIEncoding();
- //string y = byte.Parse("y");
- string s = "s";
- //encode1.GetBytes(
- // byte y2 = byte.Parse(y);
- // byte s2 = byte.Parse(s);
- char[] chars = {'y' , 's'};
- byte[] salt = encode1.GetBytes(chars);
- HMACMD5 stage2 = new HMACMD5(salt);
- byte[] hash2 = stage2.ComputeHash(hash1);
- string hashvalue = hash2.ToString() ;
- Console.WriteLine(hashvalue);
- Console.Read();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement