SecureBlackbox 16: How to modify 'EncryptedData' element properties such as Id and/or node prefix

Note: This article applies only to SecureBlackbox Legacy. For future development please consider using the latest version.

First, you need to fill all the properties needed for encryption, then call the Encrypt() method. This method will perform the encryption and build the EncryptedData structure.

Next, to change the EncryptedData element ID, set the ID property as shown (C# notation):

ElXMLEncryptor.EncryptedData.ID = "id123";

To change the prefix of the nodes add:

ElXMLEncryptor.EncryptedData.EncryptionPrefix = "xenc"; // the default value is "#default xenc"

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.