Encryption and decryption on the client side