Guest User

Untitled

a guest
Jun 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. string input = "asd";
  2.  
  3. System.Security.Cryptography.MD5 alg = System.Security.Cryptography.MD5.Create();
  4. System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
  5.  
  6.  
  7. byte[] hash = alg.ComputeHash(enc.GetBytes(input));
  8. string output = Convert.ToBase64String(hash);
  9.  
  10. // outputs: eBVpbsvxyW5olLd5RW0zDg==
  11. Console.WriteLine(output);
  12.  
  13. $input = "asd";
  14. $output = HashSomething($input);
  15. echo $output;
  16.  
  17. $hashValue = base64_encode(md5(utf8_decode($inputString)))
Add Comment
Please, Sign In to add comment