Session_Encrypt
This API encrypts data using key specified by name.
URL
./Session_Encrypt
Input Parameters
Parameters | Description |
---|---|
keyname | Name of the key to be used for encryption. |
plaintext | ASCII text to be encrypted, or hex if binary encryption is desired. |
keyiv | Optional/blank. If blank, use the key’s default IV, else, specify in Hex characters. The number of Hex character must be specific to the transformation used. |
transformation | Transformation to be used. For example: AES/ ECIES/CBC/PKCS5Padding. For more information on supported ECIES transformations, refer to the CipherTrust Application Data Protection for Java User Guide. |
Sample SOAP Parameters
<prot:Session_Encrypt>
<keyname>aes256vt</keyname>
<plaintext>0000111122223333</plaintext>
<!--Optional:-->
<keyiv></keyiv>
<transformation>AES/CBC/PKCS5Padding</transformation>
</prot:Session_Encrypt>
Output
Encrypted data in Hex format.
<ns1:Session_EncryptResponse xmlns:ns1="http://dsws.org/protectappws/">70C49C826D60E8564EDD51E8BF276C0FFF79D25420251D740D14C3919EC6663D</ns1:Session_EncryptResponse>
Note
In almost all cases, the keyiv and transformation should not be specified: It is a useful practice to utilize the Key Manager capability to store the IV for the application and AES/CBC/PKCS5Padding – the default - is the most recommended cipher block mode.