https://github.com/samcook/redis-hmac
A redis compatible Lua script for computing HMAC-SHA1 signatures
https://github.com/samcook/redis-hmac
hmac hmac-sha1-signature lua-script redis redis-hmac redis-lua-script sha1
Last synced: 9 months ago
JSON representation
A redis compatible Lua script for computing HMAC-SHA1 signatures
- Host: GitHub
- URL: https://github.com/samcook/redis-hmac
- Owner: samcook
- License: mit
- Created: 2016-03-09T16:24:14.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-09T17:05:20.000Z (almost 10 years ago)
- Last Synced: 2025-06-12T02:06:09.860Z (9 months ago)
- Topics: hmac, hmac-sha1-signature, lua-script, redis, redis-hmac, redis-lua-script, sha1
- Language: Lua
- Homepage:
- Size: 1000 Bytes
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```lua
-- 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