Decrypts 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.
Encryption flags can be applied in addition to the selected encryption mode. If the GRD_NO_COUNTER_DECREMENT flag is set, the function uses a different encryption key and the launch counter is not decreased.
The GRD_SOFTWARE_ACCELERATION flag allows you to speed up the function significantly, since the data will be decrypted by a software algorithm which key depends on the feature.
If the data was encrypted with the GRD_NO_COUNTER_DECREMENT flag, then it must be decrypted with it too
The GRD_EM_CFB and GRD_EM_OFB encryption modes are only available when the GRD_SOFTWARE_ACCELERATION flag is used simultaneously
Syntax
int GRD_API GrdFeatureDecrypt(GrdHandle handle, grd_uint32 dataSize, void* data, grd_uint32 mode, void* context, grd_uint32 contextSize);
Parameters
handle | Session handle |
dataSize | The size (in bytes) of the buffer for the encrypted message |
data | Pointer to a buffer with the encrypted message |
mode |
Encryption flags:
|
context | Pointer to GrdAesContext context required for AES encryption operations. May be NULL |
contextSize | The size of the context. Must be equal to sizeof(GrdAesContext). Zero value is allowed. |