You can use the Encryption service to a encrypt XML. You can encrypt the XML to protect sensitive data in XFA forms, by using public key cryptography, for full or partial XDP encryption and decryption.
Encryption
Decryption