fork download
  1. using System;
  2. using System.Globalization;
  3. using System.Text;
  4. using System.Security.Cryptography;
  5.  
  6. public class Test
  7. {
  8. public static void Main()
  9. {
  10. Console.WriteLine(GetMD5("Test провод"));
  11. }
  12.  
  13. public static string GetMD5(string text)
  14. {
  15. byte[] textBytes = Encoding.UTF8.GetBytes(text);
  16. byte[] hash = MD5.Create().ComputeHash(textBytes);
  17.  
  18. return Convert.ToBase64String(hash);
  19. }
  20. }
Success #stdin #stdout 0.04s 37096KB
stdin
1
2
10
42
11
stdout
amSQ0ntGLe1zffER18sBZQ==