New Erlang SHA-2 Implementation
Steve Vinoski - steve - February 21, 2011A few years ago I wrote a pure Erlang version of the SHA-2 hash algorithms (SHA-224, SHA-256, SHA-384, SHA-512). They were kinda slow but they worked fine, and a number of people used them.
I’ve now rewritten the functions in a new Erlang library application named erlsha2, available at github. The erlsha2 implementation uses Erlang NIFs, making it significantly faster than the original. The original Erlang implementations are still there too, but they’re automatically overridden by the NIF library when it loads.
Compared to the original module, the exported functions in this module have been renamed; they used to have names like hexdigest224 but they now have shorter names like sha224 to more closely match the Erlang crypto module. I also implemented the init/update/final function groups for each hash algorithm to allow data to be incrementally hashed, also to match the crypto module.
Categories: Blogs Steve Vinoski
Erlang on Twitter
» syrusakbary (Syrus Akbary Nieto): RT @newsycombinator: How and Why We Switched from Erlang to Python http://t.co/SbwC2PvZvh
» _jjyr (player): @fswordlee 是啊,不过感觉一些大牛都有特定的研究方向,比如诸霸研究erlang, agentzh研究nginx,老赵 寒冬研究js等等, 感觉还是要好好钻研一些东西比较好
» bagus_erlang (Bagus erlanggono): Tes
» laurenceputra (Laurence Putra): How and Why We Switched from Erlang to Python http://t.co/oSvsaVLeRe Reminds me of my days at Chalkboard.
» mohsabryhegazy (Mohamed Sabry Hegazy): This is interesting RT @newsycombinator How and Why We Switched from Erlang to Python http://t.co/zHjVqvH6xu
» satoshimmyo (satoshi shiiiiimmyo™): RT @yutakashino: exYCで業績好調のメトリック解析APIのMixpanelが高負荷のフロントサーバーをErlangのmochiwebからPythonのeventletに変えたそう。「pythonパワーハウスではerlangはメンテ不能」。http://t.co…
» tradem ((ó_O) ): RT @newsycombinator: How and Why We Switched from Erlang to Python http://t.co/SbwC2PvZvh
» michaelklishin (Michael Klishin): @JulianBirch @martintrojer Erlang has very cheap processes (millions per second) and only has async I/O, built on message passing (ports)
» justinsheehy (Justin Sheehy): @iand Yes, but Erlang also has the “binary” datatype which is quite space-efficient. For many stringy use cases they are what’s used.
» jasondotstar (Jason.*): How and Why We Switched from Erlang to Python http://t.co/gaXXg9vtGB #hackernews
Statistics
Number of aggregated posts: 10648
Most recent article: May 14, 2013
Latest comments
» Moraru on This is Why You Spent All that Time Learning to Program: It is true that computer science was a pain in the back at time that i’ve had to learn it…
» Commercial hand dryers on Couchbase Meetup at new HQ: Buy online from here where you will get so much of variety in Commercial hand dryers for people. If you…
» Fort McMurray Homes on Motivated Reasoning and Erlang vs Python vs Node: I don’t really understand why this post is motivational? I don’t even see a post, just a title. Fort McMurray…