From a5b5533c7405c372d51a43e61c5e943aca1250b2 Mon Sep 17 00:00:00 2001 From: Kanstantsin Date: Fri, 28 Mar 2014 20:22:48 +0200 Subject: [PATCH] replaced depricated crypto:md5 with erlang:md5 --- src/mongo.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo.erl b/src/mongo.erl index 43f78aa2..18bd7ef3 100644 --- a/src/mongo.erl +++ b/src/mongo.erl @@ -377,10 +377,10 @@ auth (Username, Password) -> catch error:{bad_command, _} -> false end. -spec pw_key (nonce(), username(), password()) -> bson:utf8(). -pw_key (Nonce, Username, Password) -> bson:utf8 (binary_to_hexstr (crypto:md5 ([Nonce, Username, pw_hash (Username, Password)]))). +pw_key (Nonce, Username, Password) -> bson:utf8 (binary_to_hexstr (erlang:md5 ([Nonce, Username, pw_hash (Username, Password)]))). -spec pw_hash (username(), password()) -> bson:utf8(). -pw_hash (Username, Password) -> bson:utf8 (binary_to_hexstr (crypto:md5 ([Username, <<":mongo:">>, Password]))). +pw_hash (Username, Password) -> bson:utf8 (binary_to_hexstr (erlang:md5 ([Username, <<":mongo:">>, Password]))). -spec binary_to_hexstr (binary()) -> string(). binary_to_hexstr (Bin) ->