Comparison

util/sasl/scram.lua @ 10217:60b445183d84

util.sasl.scram: Add support for SCRAM-SHA-256
author Kim Alvefur <zash@zash.se>
date Sun, 13 Jan 2019 14:02:29 +0100
parent 10216:a51d017e6173
child 10295:9b662488d726
comparison
equal deleted inserted replaced
10216:a51d017e6173 10217:60b445183d84
261 {"plain", "scram_"..(hashprep(hash_name))}, 261 {"plain", "scram_"..(hashprep(hash_name))},
262 scram_gen(hash_name:lower(), hash, hmac_hash, get_auth_db), {"tls-unique"}); 262 scram_gen(hash_name:lower(), hash, hmac_hash, get_auth_db), {"tls-unique"});
263 end 263 end
264 264
265 registerSCRAMMechanism("SHA-1", hashes.sha1, hashes.hmac_sha1, hashes.pbkdf2_hmac_sha1); 265 registerSCRAMMechanism("SHA-1", hashes.sha1, hashes.hmac_sha1, hashes.pbkdf2_hmac_sha1);
266 registerSCRAMMechanism("SHA-256", hashes.sha256, hashes.hmac_sha256, hashes.pbkdf2_hmac_sha256);
266 end 267 end
267 268
268 return { 269 return {
269 get_hash = get_scram_hasher; 270 get_hash = get_scram_hasher;
270 hashers = auth_db_getters; 271 hashers = auth_db_getters;