Mercurial > prosody-hg
comparison util/hmac.lua @ 1481:6401460891b2
util.hmac: Fix a global set
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 05 Jul 2009 17:06:22 +0100 |
| parents | 3135cf40110d |
| children | 9734231a569f |
comparison
equal
deleted
inserted
replaced
| 1480:93d3295fb064 | 1481:6401460891b2 |
|---|---|
| 2 local xor = require "bit".bxor | 2 local xor = require "bit".bxor |
| 3 | 3 |
| 4 module "hmac" | 4 module "hmac" |
| 5 | 5 |
| 6 local function arraystr(array) | 6 local function arraystr(array) |
| 7 t = {} | 7 local t = {} |
| 8 for i = 1,table.getn(array) do | 8 for i = 1,table.getn(array) do |
| 9 table.insert(t, string.char(array[i])) | 9 table.insert(t, string.char(array[i])) |
| 10 end | 10 end |
| 11 | 11 |
| 12 return table.concat(t) | 12 return table.concat(t) |
