SHA-1 in Erlang
Latest commit f40ded5 Feb 20, 2010 @nicolasff Inital import
Failed to load latest commit information. Inital import Feb 20, 2010
sha1.erl Inital import Feb 19, 2010


This algorithm was ported from the book Cryptography: Theory and Practice, by Douglas Stinson.

Two functions are exported, sha1:binstring/1 and sha1:hexstring/1. These functions take a data string in input and output either a binary or a string of uppercase hexadecimal values:

1> sha1:binstring("test").

2> sha1:hexstring("test").

The library features two functions to hash files, but they are very slow. Also be aware that although SHA-1 outputs 160 bits, an attack exists using 2^63 operations "only".