uninlined hash functions in preparation of wrapping into lua