Aes_enc(t)
Encrypts the data using the previously-created AES key.
Syntax
Aes_enc(t);
Arguments
| Name | Description |
|---|---|
|
t |
A table which specifies the message, key, and key size that was used to encrypt. |
Events
Applicable in all events.
Example
when HTTP_REQUEST {
t={};
t["message"] = "MICK-TEST";
t["key"] = "aaaaaaaaaabbbbbb" --16bit
t["size"]= 128 -- 128, 192, or 256, the corresponding key length is 16, 24, and 32
enc = aes_enc(t)
debug("The aes_enc output to HEX\n %s\n",to_HEX(enc));
}
Note:
- Message: a string which will be encrypted
- Key: a string to encrypt str
- Size: must be 128, 192, or 256, the corresponding key length is 16, 24, and 32
Supported Version
FortiADC version 5.2.x and later.