GCM_Encrypt
This API encrypts data Using GCM standards.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/gcmencrypt
Input Parameters
Parameters | Description |
---|---|
username | User name (optional). |
password | Password associated with the user (optional). |
keyname | Name of the key to be used for decryption. |
plaintext | ASCII text to be encrypted, or hex if binary encryption is desired. |
iv | Specify 1 to 16 bytes IV in Hex format. For example 697473617265616c6c79636f6f6c6976. |
aad | Optional/blank, the data to be passed to the recipient in plain text, needs to be “authenticated”. |
authtaglength | The tag length to ensure the data is not accidentally altered, must be 32 to 128 bits and multiple of 8. |
transformation | Transformation to be used. It overrides the standard AES/GCM/NoPadding. |
certAlias | Client certificate alias for making SSL connections (optional). |
certPass | Password for the provided certificate alias (optional). |
Sample REST call for cxf
request
{
"GCM_Encrypt": {
"username": "crypto",
"password": "asdf1234",
"keyname": "testaesgcm",
"authtaglength": "72",
"iv": "31323334353637383132331212",
"aad": "1115",
"plaintext": "hello"
}
}
response
{
GCMEncryptResponse: {
cipherText: "2BDC88892AAB9EF9074860028433"
}
}
Sample SOAP Parameters
<prot:GCM_Encrypt>
<username>crypto</username>
<password>asdf1234</password>
<keyname>testaesgcm</keyname>
<authtaglength>72</authtaglength>
<iv>31323334353637383132331212</iv>
<!--Optional:-->
<aad>122131</aad>
<plaintext>hello</plaintext>
</prot:GCM_Encrypt>
Output
Encrypted data in Hex format.
#text
<ns2:GCM_EncryptResponse xmlns:ns2="http://dsws.org/protectappws/">A0387706C73C700F4DA3409057E30BBB1BB280562F2C4729</ns2:GCM_EncryptResponse>