{"id":1354,"date":"2014-08-09T23:17:59","date_gmt":"2014-08-10T03:17:59","guid":{"rendered":"http:\/\/www.jgarces.info\/?p=1354"},"modified":"2014-08-18T23:24:17","modified_gmt":"2014-08-19T03:24:17","slug":"crypt-with-sha1","status":"publish","type":"post","link":"https:\/\/www.jgarces.info\/en\/crypt-with-sha1\/","title":{"rendered":"Crypt with SHA1"},"content":{"rendered":"<p>Method to crypt with SHA1<\/p>\n<pre lang=\"csharp\">\/\/\/ \r\n\/\/\/ Crypt the string with SHA1\r\n\/\/\/ \r\npublic static string EncriptarSHA1(string sCadena)\r\n{\r\n\tSystem.Security.Cryptography.SHA1 sha1 = System.Security.Cryptography.SHA1Managed.Create();\r\n\r\n\tASCIIEncoding encoding = new ASCIIEncoding();\r\n\tbyte[] stream = null;\r\n\tStringBuilder codificada = new StringBuilder();\r\n\tstream = sha1.ComputeHash(encoding.GetBytes(sCadena));\r\n\r\n\tfor (int i = 0; i < stream.Length; i++) codificada.AppendFormat(\"{0:x2}\", stream[i]);\r\n\treturn codificada.ToString();\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Method to crypt with SHA1 \/\/\/ \/\/\/ Crypt the string with SHA1 \/\/\/ public static string EncriptarSHA1(string sCadena) { System.Security.Cryptography.SHA1 sha1 = System.Security.Cryptography.SHA1Managed.Create(); ASCIIEncoding encoding = new ASCIIEncoding(); byte[] stream = null; StringBuilder codificada = new StringBuilder(); stream = sha1.ComputeHash(encoding.GetBytes(sCadena)); for (int i = 0; i < stream.Length; i++) codificada.AppendFormat(\"{0:x2}\", stream[i]); return codificada.ToString(); }\n<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[33],"class_list":["post-1354","post","type-post","status-publish","format-standard","hentry","category-general-en-2","tag-development"],"_links":{"self":[{"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/posts\/1354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/comments?post=1354"}],"version-history":[{"count":1,"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/posts\/1354\/revisions"}],"predecessor-version":[{"id":1355,"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/posts\/1354\/revisions\/1355"}],"wp:attachment":[{"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/media?parent=1354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/categories?post=1354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jgarces.info\/en\/wp-json\/wp\/v2\/tags?post=1354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}