AAL2GenQAKey

Prev Next

Function prototype

aat_int32 AAL2GenQAKey (aat_ascii*      aQAIndexList,
                        aat_ascii*      aQAHashData,
                        aat_ascii*      aUserID,
                        aat_ascii*      aQAKey[32+1]);

Description

This function generates a QA key for AAL2GenActivationCodeEx based on two lists of indexes and their matching hashes, and the QA key user ID owner.

Parameters

  Table: Parameters (AAL2GenQAKey)
TypeNameUseDescription
aat_ascii *aQAIndexListIList of the question index on two randomly chosen characters.
aat_ascii *aQAHash Data IList of matching answer hashes on 30 characters.
aat_ascii *aUserIdIID of the QAKey owner.
aat_ascii [32+1]aQAKey OKey on 32 characters calculated from the answer hash of the user. This key will be used to encrypt the activation data. The key is null-terminated.

Return codes

  Table: Return codes (AAL2GenQAKey)
CodeMeaningCodeMeaning
0Success541Invalid index list
533Invalid UserId pointer542Invalid hash list
540Invalid QAkey pointer-1501Memory allocation failed