Skip to content

A redis compatible Lua script for computing HMAC-SHA1 signatures

License

Notifications You must be signed in to change notification settings

samcook/redis-hmac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

redis-hmac

A redis compatible Lua script for computing HMAC-SHA1 signatures

Usage

Copy the script into your redis Lua script that requires calculating an HMAC-SHA1 signature.

-- insert hmac-sha1.lua here

local key = 'mysecretkey'
local text = 'content to sign'

local signature = hmac_sha1().compute(key, text)

Credits

HMAC Lua code adapted from https://github.com/kikito/sha1.lua to use redis builtin SHA1 and bit operations

Releases

No releases published

Packages

No packages published

Languages