lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Jul 21, 2009, at 10:39 AM, Jacques Chester wrote:

As part of a project I am developing I am planning to use SHA1 HMAC digests.

If this is not performance critical, there is also a SHA1 implementation in pure Lua:

FWIW, here is an HMAC-SHA1 implementation:

Usage example:

local HMAC = require( 'HMAC' )

print( HMAC( 'Jefe', 'what do ya want for nothing?' ) )

> 'effcdf6ae5eb2fa2d27416d5f184df9c259a7c79'

This uses Klaus Ripke's excellent slncrypto library: