Explorar el Código

Update emqttd_auth_mod.erl

huangpengju hace 9 años
padre
commit
b5ff80499a
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. 1 2
      src/emqttd_auth_mod.erl

+ 1 - 2
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(<<X:128/big-unsigned-integer>>) ->
     iolist_to_binary(io_lib:format("~32.16.0b", [X]));