|Function||avi.crypto.decrypt( ciphertext, key [, iv [, algo]] )|
|Description||DataScripts can be used to encrypt and decrypt data. The supported decryption algorithms are AES and 3DES. For AES decryption, AES128, AES192 and AES256 are supported and require key lengths of 128, 192, and 256 bits respectively. 3DES requires key length (3X56) of 168 bits padded out to 192 bits. Whichever decryption method is being used, the correct key length via the key string is mandatory.
Only CBC (cipher block chaining) mode is supported. Default decryption algorithm used is AES256 with the default IV of “0123456789012345” and default mode of CBC.
|Parameter||ciphertext is the encrypted text or string to be decrypted.
key is a string, which is the private key to use for the encryption.
iv is a string and is the initialization vector.
algo is the decryption algorithm. Choose between:
|Returns||A decrypted string|
|Example||During the HTTP Response event, check for a header then encrypt its value.
During the HTTP Request event, check for a header then decrypt its value.