hash computation