Discuss this help topic in SecureBlackbox Forum
Encyrpt the binary data
First you need to specify, what exactly you will encrypt. XMLEnc standard lets you encrypt the element itself or it's contents. You choose what you encrypt by setting EncryptedDataType property to either xedtElement or xedtContent.
Next, call Encrypt() method of TElXMLEncryptor class and pass it the binary data which is to be encrypted.
Create an instance of TElXMLDOMDocument class.
Call Save() method of TElXMLEncryptor class and pass the newly created instance of TElXMLDOMDocument as a parameter. The Save() method will return the node, which contains the encrypted data ("AnEncryptedNode").
Call AppendChild() method of TElXMLDOMDocument class and pass it AnEncryptedNode as a parameter.
Now you can save the document to the file or other stream.