lua scripts; exposed hash function to lua