SymmetricKey Property
The symmetric key used to encrypt and decrypt the XML.
Object Oriented Interface
public function getSymmetricKey(); public function setSymmetricKey($value);
Procedural Interface
ipworksencrypt_xmlencrypt_get($res, 22 ); ipworksencrypt_xmlencrypt_set($res, 22, $value );
Default Value
''
Remarks
This property specifies the symmetric key used to encrypt and decrypt the XML.
Encrypt Notes
When calling Encrypt if the RecipientCert* properties are set, then the SymmetricKey will be encrypted and included in the XML as an encrypted key. Using asymmetric encryption to encrypt the SymmetricKey allows for secure transmission of the key. This is also referred to as using a session key, as no prior knowledge of the SymmetricKey is required by the recipient.
If the RecipientCert* properties are set and SymmetricKey is left empty, then a SymmetricKey value will automatically be generated by the class when Encrypt is called.
When calling Encrypt if the RecipientCert* properties are are not set, then the SymmetricKey value must be known by the recipient before the message can be decrypted.
Decrypt Notes
When calling Decrypt if the data contains an encrypted key the class will attempt to use the certificate specified by the Cert* properties to decrypt the encrypted key and this property is ignored.
When calling Decrypt if the data does not contain an encrypted key then SymmetricKey must be set either before calling Decrypt, or within the EncryptedDataInfo event.
Legal Key and Block Sizes (in bits)
AES | DES | 3DES | |
Minimum Key Size | 128 | 64 | 128 |
Maximum Key Size | 256 | 64 | 192 |
Key Size Step | 64 | 0 | 64 |
Block Size | 128 | 64 | 64 |
This property is not available at design time.
Data Type
Binary String