# HG changeset patch # User Kim Alvefur # Date 1412072193 -7200 # Node ID 056ccefa6acfcb8b79a3645a19dedac94c202a09 # Parent d8c3e94d765db5eb7d0e818c5984b8e07390b749 util.sasl.scram: Slight optimization of HMAC diff -r d8c3e94d765d -r 056ccefa6acf util/sasl/scram.lua --- a/util/sasl/scram.lua Tue Sep 30 11:59:52 2014 +0200 +++ b/util/sasl/scram.lua Tue Sep 30 12:16:33 2014 +0200 @@ -18,8 +18,9 @@ return crypto.digest("sha1", str, true); end +local _hmac_digest = crypto.hmac.digest; local function HMAC(key, str) - return crypto.hmac.digest("sha1", str, key, true); + return _hmac_digest("sha1", str, key, true); end local function Hi(str, salt, i)