Added realtime encryption and decryption