Added encryption and decryption of messages