fork download
  1. using static System.Console;
  2. using System.Security.Cryptography;
  3. using System.Text;
  4.  
  5. public class Program {
  6. public static void Main() => WriteLine(sha512("senha qualquer"));
  7.  
  8. static string sha512(string password) {
  9. byte[] bytes = new SHA512Managed().ComputeHash(Encoding.UTF8.GetBytes(password), 0, Encoding.UTF8.GetByteCount(password));
  10. var hash = new StringBuilder();
  11. foreach (var item in bytes) hash.Append(item.ToString("x2"));
  12. return hash.ToString();
  13. }
  14. }
  15.  
  16. //https://pt.stackoverflow.com/q/87329/101
Success #stdin #stdout 0.02s 16400KB
stdin
Standard input is empty
stdout
385ddefbabb3204a76f9c358fbe3d2f63278acd71fc25a273fbac42498cf43d25d541f69b784d6d5375e909521114f3b44392d4859c0768ed147b7d86f2114f2