Discuss this help topic in SecureBlackbox Forum
Manually encrypt assertions
First of all you should create an instance of TElSAMLEncryptedAssertionElement. If an assertion needs to be encrypted then you should create and instance of TElSAMLEncryptionHandler, set its Certificate property to an encryption certificate object and then assign this handler to TElSAMLEncryptedAssertionElement.Handler property. Assertion properties should be assigned before it is saved using TElSAMLEncryptedAssertionElement.SaveToXML method.
Assertion properties should be assigned before the assertion is saved using TElSAMLEncryptedAssertionElement.SaveToXML() method.