added encryption and decryption of input parameter with key