anchor.diff:  %%% SHA-1 module
   %%% Author: Nicolas Favre-Felix - n.favrefelix#gmail.com
   %%% License: Lesser GPL (LGPL) v2
  -%%% 
  +%%%
   %%% exports binstring(Str), hexstring(Str). binstring/1 returns the hash as
   %%% a binary, hexstring/1 as an erlang string, uppercase.
   %%% in case of failure, the returned value is {error, Something}.
  
positive.code: compute_ws(<<>>) -> [];
  compute_ws(<<Wi:32, Other/binary>>) -> [Wi] ++ compute_ws(Other).
  
  %% generates W_t. 
  compute_wt(Ws) -> compute_wt(Ws, 16).
  compute_wt(Ws, 80) -> Ws;
  compute_wt(Ws, T) -> 
  	Wp = map(fun(X)->nth(1 + T - X, Ws) end, [3,8,14,16]),
  	Wt_pre = foldl(fun(X,Y)->X bxor Y end, 0, Wp),
  	Wt = rotl(1, Wt_pre),
  
negative.code: inner_loop(T, {A,B,C,D,E}, Ws) ->
  	Temp = add([rotl(5, A), f(T, B,C,D), E, nth(1+T, Ws), k(T)]),
  	inner_loop(T+1, {Temp, A, rotl(30, B), C, D}, Ws).
  
  