fork(64) download
  1. using System;
  2. using System.Security.Cryptography;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.  
  9. String publicKeyBase64 = "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAENGbyXUzeZTdeyyNuXyc0nMzXmnLlxMwd/t/sCZr3RPhytPbZpR/V4/xHqN/MVzozzq30I0/eUefbThEBl236Og==";
  10.  
  11. byte[] publicKey = Convert.FromBase64String(publicKeyBase64);
  12. SHA256 sha256 = SHA256Managed.Create();
  13. byte[] hash = sha256.ComputeHash(publicKey);
  14. String publicKeyHash = Convert.ToBase64String(hash);
  15.  
  16. Console.WriteLine("Result: {0}", publicKeyHash);
  17. }
  18. }
Success #stdin #stdout 0s 132544KB
stdin
Standard input is empty
stdout
Result: /TN5n+2do5w1qUljgaXbKVvxAqW7+4ae7mJ+Z+E189k=