expose sha1 encode to lua