working encryption and decryption