Digest with more compat with LuaCrypto