Guest User

Untitled

a guest
Jun 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. md5("apple", true) //result :8pѕ'OlIігg(•
  2.  
  3. byte[] asciiBytes = ASCIIEncoding.ASCII.GetBytes("apple");
  4. byte[] hashedBytes = MD5CryptoServiceProvider.Create().ComputeHash(asciiBytes);
  5. return System.Text.Encoding.ASCII.GetString(hashedBytes); //result: 8p?'OlI??g(?
  6.  
  7. var md5 = System.Security.Cryptography.MD5.Create();
  8. byte[] inputBytes = Encoding.Default.GetBytes(input);
  9. byte[] hash = md5.ComputeHash(inputBytes);
  10.  
  11. var s = Encoding.Default.GetString(hash);
Add Comment
Please, Sign In to add comment