util/sasl/scram.lua

changeset 3117
f4e7ca2aa2f7
parent 3116
90a98a6b52ac
child 3119
c1ac08fa2533
child 3120
6f1b7260925c
equal deleted inserted replaced
3116:90a98a6b52ac 3117:f4e7ca2aa2f7
92 return username; 92 return username;
93 end 93 end
94 94
95 function saltedPasswordSHA1(password, salt, iteration_count) 95 function saltedPasswordSHA1(password, salt, iteration_count)
96 local salted_password 96 local salted_password
97 if type(password) ~= "string" and type(salt) ~= "string" and type(iteration_count) ~= "number" then 97 if type(password) ~= "string" or type(salt) ~= "string" or type(iteration_count) ~= "number" then
98 return false, "inappropriate argument types" 98 return false, "inappropriate argument types"
99 end 99 end
100 if iteration_count < 4096 then 100 if iteration_count < 4096 then
101 log("warning", "Iteration count < 4096 which is the suggested minimum according to RFC 5802.") 101 log("warning", "Iteration count < 4096 which is the suggested minimum according to RFC 5802.")
102 end 102 end

mercurial