Permalink
Browse files

Updated the random string generation.

  • Loading branch information...
1 parent 1524da2 commit a9054b17cf51a699217adc8a42d698459141f0b1 @Joony committed May 20, 2009
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
@@ -23,7 +23,7 @@
-export([generate_random_string/1, md5_hex/1]).
generate_random_string(Length) ->
- lists:flatten(lists:foldl(fun(X,AccIn) -> [random:uniform(90) + 32|AccIn] end, [], lists:seq(1,Length))).
+ lists:map(fun (_) -> random:uniform(90)+$\s+1 end, lists:seq(1,Length)).
md5_hex(S) ->
[hex(N) || <<N:4>> <= erlang:md5(S)].

0 comments on commit a9054b1

Please sign in to comment.