{"id":31093,"date":"2006-05-23T10:00:17","date_gmt":"2006-05-23T10:00:17","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2006\/05\/23\/raymond-makes-a-psychic-prediction-for-2006\/"},"modified":"2006-05-23T10:00:17","modified_gmt":"2006-05-23T10:00:17","slug":"raymond-makes-a-psychic-prediction-for-2006","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20060523-17\/?p=31093","title":{"rendered":"Raymond makes a psychic prediction for 2006"},"content":{"rendered":"<p>\nI have gazed into my crystal ball and emerged with a prediction for 2006.\nRevealing my prediction now may influence the event itself,\nso I will post only the hash for the prediction.\nI will post the actual prediction at the end of the year.\n<\/p>\n<p><pre>\nusing System.Security.Cryptography;\nusing System;\nclass Prediction {\n static void DoHash(byte[] bytes, string name, HashAlgorithm hash)\n {\n  Console.WriteLine(name);\n  hash.ComputeHash(bytes);\n  byte[] result = hash.Hash;\n  for (int i = 0; i &lt; result.Length; i++) {\n   Console.Write(\"{0:X2}\", result[i]);\n   if (i % 32 == 31) Console.WriteLine();\n  }\n  if (result.Length % 32 != 0) Console.WriteLine();\n }\n static void Main()\n {\n  string msg = \"prediction goes here\";\n  Console.WriteLine(\"length {0}\", msg.Length);\n  byte[] bytes = (new System.Text.ASCIIEncoding()).GetBytes(msg);\n  DoHash(bytes, \"MD5\", MD5.Create());\n  DoHash(bytes, \"SHA1\", SHA1.Create());\n  DoHash(bytes, \"SHA256\", SHA256.Create());\n  DoHash(bytes, \"SHA384\", SHA384.Create());\n  DoHash(bytes, \"SHA512\", SHA512.Create());\n }\n}\n<\/pre>\n<p>\nThe output of this program (after you replace &#8220;prediction goes here&#8221;\nwith the actual prediction, of course)\nis as follows:\n<\/p>\n<pre>\nlength 45\nMD5\n6D915EC203DF0C918D13B63C4FF7C1EE\nSHA1\n49A2E2B22D27D450890E30D0A34EBA53B454925E\nSHA256\n2C928DC82E133B0FAD5DAA64BC373BE400C700B124749072816B7053EECC9A82\nSHA384\n080BDBB804B8F9B28731E6E17F872C6BE6F8F08B6670CA3424726295DE58A8DE\n2FE9EA43D724B7AA2ED3366CA9A80631\nSHA512\nD0A84D8B1B330F101D115044C9C7146605C951199BC2F036EE677C690D5151A9\n3F78FDFD8E6FF147EE2DB517A96642B24ED17D2306A772B953281CB4C0BEEDF1\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have gazed into my crystal ball and emerged with a prediction for 2006. Revealing my prediction now may influence the event itself, so I will post only the hash for the prediction. I will post the actual prediction at the end of the year. using System.Security.Cryptography; using System; class Prediction { static void DoHash(byte[] [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-31093","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>I have gazed into my crystal ball and emerged with a prediction for 2006. Revealing my prediction now may influence the event itself, so I will post only the hash for the prediction. I will post the actual prediction at the end of the year. using System.Security.Cryptography; using System; class Prediction { static void DoHash(byte[] [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/31093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=31093"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/31093\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=31093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=31093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=31093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}