fix macros conflicts when included intsafe.h
revamp the hash api once more
fix bit shift 64 vs 32 bit vars