using System.Diagnostics; using System.Security.Cryptography; using System.Text; var stopwatch = Stopwatch.StartNew(); var data = "/ETHICAL.BLUE/"; for(ulong nonce = 0x0000000000000000; nonce < ulong.MaxValue; nonce++) { var prefix = "0xC0FFEE"; var hash = SHA512.HashData( Encoding.UTF8.GetBytes( string.Format("{0}{1:X16}", data, nonce))); var digest = $"0x{Convert.ToHexString(hash)}"; Console.WriteLine( $"{digest[..10]}..."); if (digest.StartsWith(prefix)) { Console.WriteLine(string.Format( "SHA512({0}{1:X16})={2}...", data, nonce, digest[..10])); break; } } stopwatch.Stop(); Console.WriteLine( stopwatch.Elapsed.ToString());