finish hashing code