VLScgSetSecrets
Syntax
int VLScgSetSecrets (VLScg_HANDLE iHandle, codeT *codeP, char *valu, int num);
Argument | Description |
iHandle |
The instance handle for this library. |
codeP |
The pointer to the codeT struct. |
value |
Any printable ASCII text. |
num |
Number of secrets: should be from 0 to num_secrets -1. num is the position in the array storing the secrets. The value varies from 0 to num_secrets-1, where num_secrets is set using VLScgSetNumSecrets |
Description
Sets the value of the specified challenge-response secrets.
Both the application and the license contain data known as secrets. When an application is configured to challenge, it generates a random text string, which is passed as the challenge value to the License Manager. In response to this challenge value, the License Manager examines the software license to determine the secret and computes the corresponding answer. The result is then passed back to the client application as the response to the challenge.
The purpose of the challenge is to verify that there is a valid license present and an authenticated License Manager is responding to the challenge.
NOTE Reserved characters such as '!' and '$' cannot be used with secret text. Comma (",") is a reserved character that acts as a delimiter and must be avoided from Sentinel RMS v10 onwards. Hash ("#') is a comment character and any text appearing after it will be ignored.
Returns
The status code VLScg_SUCCESS is returned if successful. Otherwise, it will return the following error codes:
Error Code | Description |
VLScg_INVALID_CHARS |
If string is not valid. |
VLScg_EXCEEDS_MAX_VALUE |
If value exceeds num_secrets-1. |
VLScg_LESS_THAN_MIN_VALUE |
If the value is less than 0. |
For the complete list of the error codes, refer to License Generation and Revocation Error Codes .