Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use updated crypto api #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% -*- mode: erlang -*-

{deps, [
{mochiweb, ".*", {git, "git://github.com/mochi/mochiweb.git", {branch, "master"}}}
]
}.
%% {deps, [
%% {mochiweb, ".*", {git, "git://github.com/mochi/mochiweb.git", {branch, "master"}}}
%% ]
%% }.
2 changes: 1 addition & 1 deletion src/log4erl_utils.erl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ to_log(Cur, Level) ->
end.

get_id() ->
{_,_,N} = now(),
{_,_,N} = os:timestamp(),
Id = "log4erl_" ++ integer_to_list(random:uniform(N)),
list_to_atom(Id).

Expand Down
2 changes: 1 addition & 1 deletion src/log_manager.erl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ change_filename(Logger, Appender, Filename) ->
%% Logger API functions
%%--------------------------------------------------------------------
log(Logger, Level, Log, Data) ->
Now = {_, _, Ms} = erlang:now(),
Now = {_, _, Ms} = os:timestamp(),
T = calendar:now_to_local_time(Now),
?LOG2("Logging:~n ~p ~p ~p ~p~n",[Logger, Level, Log, Data]),
LL = #log{level=Level, msg=Log, data=Data, time=T, millis = Ms div 1000},
Expand Down
2 changes: 1 addition & 1 deletion src/smtp_fsm.erl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ hexit(Int) ->
%% generates MD5 mac and returns as hex string
md5_hmac(Challenge,Pwd) ->
crypto:start(),
Md5_bin = crypto:md5_mac(Pwd,Challenge),
Md5_bin = crypto:hmac(md5, Pwd,Challenge),
crypto:stop(),
hexdigest(Md5_bin).

Expand Down
2 changes: 1 addition & 1 deletion src/xml_appender.erl
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ escape_attr(S) when is_list(S) ->
escape_attr(I) when is_integer(I) ->
escape_attr(integer_to_list(I), []);
escape_attr(F) when is_float(F) ->
escape_attr(mochinum:digits(F), []).
escape_attr("voided", []).%%mochinum:digits(F), []).

escape([], Acc) ->
lists:reverse(Acc);
Expand Down