|
Use passwords or symmetric keys for encryption
To encrypt the data or the encryption key using a password or a secret (symmetric) key, you need to employ TElXMLKeyInfoSymmetricData class.
All you need to do is
- create an instance of TElXMLKeyInfoSymmetricData class;
- create an instance of TElSymmetricKeyMaterial class and assign it to Key property of TElXMLKeyInfoSymmetricData class;
- set Algorithm property of TElSymmetricKeyMaterial class to the desired symmetric algorithm;
- set the Key and IV (if needed) properties of TElSymmetricKeyMaterial class
If you are using the instance of TElXMLKeyInfoSymmetricData class for encryption of the data, assign it to KeyData property of TElXMLEncryptor class.
If you are using the instance of TElXMLKeyInfoSymmetricData class for encryption
of the encryption key (when KeyEncryptionType property
of TElXMLEncryptor class is set to xetKeyWrap),
assign it to KeyEncryptionKeyData property.
|