data hashing functionality