hash function and its decryption added