]> granicus.if.org Git - ejabberd/commitdiff
Replace crypto calls that will be removed in a future release
authorBadlop <badlop@process-one.net>
Sat, 4 Apr 2015 12:09:58 +0000 (14:09 +0200)
committerBadlop <badlop@process-one.net>
Sat, 4 Apr 2015 12:09:58 +0000 (14:09 +0200)
src/mod_admin_extra.erl

index 043b6f3c16bfbc25e7368f2db97c49871ac133c0..0162a40c34cfe2db230c913fe060f061625d8cf7 100644 (file)
@@ -603,10 +603,10 @@ check_password_hash(User, Host, PasswordHash, HashMethod) ->
     end.
 get_md5(AccountPass) ->
     lists:flatten([io_lib:format("~.16B", [X])
-                  || X <- binary_to_list(crypto:md5(AccountPass))]).
+                  || X <- binary_to_list(erlang:md5(AccountPass))]).
 get_sha(AccountPass) ->
     lists:flatten([io_lib:format("~.16B", [X])
-                  || X <- binary_to_list(crypto:sha(AccountPass))]).
+                  || X <- binary_to_list(p1_sha:sha1(AccountPass))]).
 
 num_active_users(Host, Days) ->
     list_last_activity(Host, true, Days).