diff --git a/src/emqttd_auth_mod.erl b/src/emqttd_auth_mod.erl index 4ddf4c067..8f0b7405a 100644 --- a/src/emqttd_auth_mod.erl +++ b/src/emqttd_auth_mod.erl @@ -62,8 +62,7 @@ passwd_hash(sha256, Password) -> hexstring(crypto:hash(sha256, Password)); passwd_hash(pbkdf2,{Salt,Password,Macfun,Iterations,Dklen}) -> {ok,Hexstring} = pbkdf2:pbkdf2(Macfun, Password, Salt, Iterations, Dklen), - hexstring(Hexstring). - + pbkdf2:to_hex(Hexstring). hexstring(<>) -> iolist_to_binary(io_lib:format("~32.16.0b", [X]));