fork(1) download
  1. using System;
  2. using System.Globalization;
  3. using System.Security.Cryptography;
  4. using System.Text;
  5.  
  6. public class Test
  7. {
  8. public static void Main()
  9. {
  10. string key = "àéèìòù";
  11.  
  12. StringBuilder sb;
  13. using (var sha1 = new SHA1Managed())
  14. {
  15. var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(key));
  16. sb = new StringBuilder(hash.Length * 2);
  17. foreach (byte b in hash)
  18. {
  19. sb.Append(b.ToString("x2"));
  20. }
  21. }
  22.  
  23. Console.WriteLine(sb);
  24. }
  25. }
Success #stdin #stdout 0.05s 23944KB
stdin
Standard input is empty
stdout
eea46db28f4505b72aeae0a26acc477efeb3fd9b