An open API service indexing awesome lists of open source software.

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

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