Description
Encrypts the data buffer using the AES128 cryptographic algorithm associated with the Feature. Checks the license conditions of the feature.
If the license is limited by the number of launches, this function decrements the value of the launch counter for the license.
If the GRD_NO_COUNTER_DECREMENT flag is set, the function uses a different encryption key and the launch counter is not decreased.
The encrypting results of the same data with and without the GRD_NO_COUNTER_DECREMENT flag will be different
For data encryption, it is possible to use the iv initialization vector in all modes except GRD_EM_ECB.
Syntax
function GrdFeatureEncrypt( handle: GrdHandle; dataSize: grd_uint32; data: Pointer; mode: grd_uint32; iv: Pointer; ivSize: grd_uint32): Integer; stdcall;
Parameters
handle | Session handle |
dataSize | The size (in bytes) of the encryption buffer |
data | Pointer to the buffer for encryption |
mode |
|
iv | Buffer to transmit initialization vector. Can be NULL |
ivSize | Size of the iv initialization vector buffer. Must be equal 16 bytes. Can be 0 |