VLScgCalculateLicenseHash

Syntax

int VLScgCalculateLicenseHash (char *pcLicenseString, unsigned char *pucLicenseHash, 
				int *piLicenseHashLength);
Argument Description

pcLicenseString

A pointer to the license string whose hash is to be calculated.

pucLicenseHash

A pointer to the location where license hash is to be stored.

If the value passed is NULL, the required length for this buffer is returned to the third argument piLicenseHashLength.

piLicenseHashLen

gth

The length of the hash buffer. User needs to allocate memory.

Description

Calculates the hash of a license string. A hash uniquely identifies a license string.

NOTE   Make sure you pass a valid license string for calculating license hash. You can use VLScgDecodeLicense\VLScgDecodeLicenseExt to verify the license string's validity.

Returns

The status code VLScg_SUCCESS is returned if successful. Otherwise, it will return the following error codes:

Error Code

Description

VLScg_INVALID_INPUT

One or more input parameters are invalid.

VLScg_BUFFER_TOO_SMALL

If the input size of the buffer specified for storing hash is smaller than required.

For the complete list of the error codes, refer to License Generation and Revocation Error Codes .