FPE_Encrypt
This API encrypts data using FPE.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/fpe_encrypt
Input Parameters
Parameters | Description |
---|---|
username | User name (optional). |
password | Password associated with the user (optional). |
plaintext | Data to be encrypted. |
keyname | Name of the key. |
keyiv | Hex encoded 56 bytes if plaintext > 56 Numeric value (optional). |
tweakAlgo | Default is none (optional). |
tweakData | If tweak algorithm is "None" or not passed in the API, the value must be HEX encoded 64 bit long string(HEX encoding will consume 16 characters). Tweak data is mandatory if Tweak Algo is given, else it is optional. |
certAlias | Client certificate alias for making SSL connections (optional). |
certPass | Password for the provided certificate alias (optional). |
Important Notes
In case if tweak data algorithm represents any valid algorithm, the tweak data value can be any ASCII string (not necessarily HEX). Tweak Data is first processed using Tweak Hash Algorithm and the result is truncated to 64 bits for input to the FPE algorithm.
The
FPE_Encrypt
API only works with the FPE/AES/CARD10 algorithm.
Sample REST call for cxf
request
{
"FPE_Encrypt": {
"username": "jcetest",
"password": "asdf1234",
"keyname": "aes256vt",
"tweakAlgo": "none",
"tweakData": "1a23456712345678",
"plaintext": "239494"
}
}
response
{
"EncryptFPEResponse": {
"cipherText": "C9CE1F"
}
}
Sample SOAP Parameters
<prot:FPE_Encrypt>
<username>jcetest</username>
<password>asdf1234</password>
<keyname>AESFPE</keyname>
<tweakData>1234567812345678</tweakData>
<plaintext>1234</plaintext>
</prot:FPE_Encrypt>
Output
Encrypted data in Hex.
<ns2:FPE_EncryptResponse xmlns:ns2="http://dsws.org/protectappws/">34373038</ns2:FPE_EncryptResponse>