{"id":182,"date":"2009-01-02T10:05:46","date_gmt":"2009-01-02T14:05:46","guid":{"rendered":"http:\/\/steve.vinoski.net\/blog\/?p=182"},"modified":"2009-01-03T13:14:59","modified_gmt":"2009-01-03T17:14:59","slug":"sha-256-in-erlang","status":"publish","type":"post","link":"https:\/\/steve.vinoski.net\/blog\/2009\/01\/02\/sha-256-in-erlang\/","title":{"rendered":"SHA-256 in Erlang"},"content":{"rendered":"<p><a href=\"http:\/\/www.sriramkrishnan.com\/blog\/\">Sriram Krishnan<\/a> was recently <a href=\"http:\/\/www.sriramkrishnan.com\/blog\/2008\/12\/thoughts-on-erlang.html\">lamenting the lack of SHA-256 support<\/a> in <a href=\"http:\/\/erlang.org\/doc\/man\/crypto.html\">Erlang&#8217;s crypto module<\/a>, so just for fun I wrote a simple <a href=\"\/code\/sha256.erl\">sha256 module<\/a> based on the <a href=\"http:\/\/en.wikipedia.org\/wiki\/SHA1\">pseudocode in Wikipedia<\/a>. The tests use the test data from <a href=\"http:\/\/www.aarongifford.com\/computers\/sha.html\">this C implementation<\/a>.<\/p>\n<p><em>[Update: I&#8217;ve posted a <a href=\"\/blog\/2009\/01\/03\/more-sha-in-erlang\/\">new module<\/a> that implements more SHA digest variants and so renders this module obsolete.]<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sriram Krishnan was recently lamenting the lack of SHA-256 support in Erlang&#8217;s crypto module, so just for fun I wrote a simple sha256 module based on the pseudocode in Wikipedia. The tests use the test data from this C implementation. [Update: I&#8217;ve posted a new module that implements more SHA digest variants and so renders [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,4],"tags":[169,140],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-code","category-erlang","tag-code","tag-erlang"],"_links":{"self":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":12,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/steve.vinoski.net\/blog\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}