diff --git a/otp.lua b/otp.lua index e5c3719..fb75e50 100644 --- a/otp.lua +++ b/otp.lua @@ -118,7 +118,7 @@ end function TOTP_MT:calc_token() local ngx_time = math.floor(ngx.time() / 30) - HMAC_Result_Final = {ngx.hmac_sha1(self.key_decoded, totp_time_calc(ngx_time)):byte(1, -1)} + local HMAC_Result_Final = {ngx.hmac_sha1(self.key_decoded, totp_time_calc(ngx_time)):byte(1, -1)} local HMAC_Offset = band(HMAC_Result_Final[20], 0xF) @@ -172,4 +172,4 @@ function TOTP_MT:serialize() } end -return _M \ No newline at end of file +return _M