Back out the thin convenience wrapper hash and hash_hmac. Replacements: Crypto.hash(Crypto.SHA1, true)(x) -> Crypto.SHA1.hash(x) Crypto.hash(Crypto.SHA1) -> sprintf("%x", Crypto.SHA1.hash(x)) Crypto.hash_hmac(Crypto.SHA1,k)(x, true) -> Crypto.SHA1.HMAC(k)(x)