AAL2QAGenQABlob

Prev Next

Function prototype

aat_int32 AAL2QAGenQABlob (aat_int32      QANb,
                           aat_ascii*     aQAList,
                           aat_ascii*     aUserID,
                           aat_ascii*     aQABlob,
                           aat_int32*     QABlobSize);

Description

This function generates a QA BLOB from a list of question indexes with clear answer and a user ID.

Parameters

  Table: Parameters (AAL2QAGenQABlob)
TypeNameUseDescription
aat_int32QANbINumber of items in the QA list.
aat_ascii *QAListI

List of question indexes on two characters and answers separated by a semicolon (;).

 

01aNsWeR1;0Fans@er4;2Eanswer22;19answer09;8Fan;

aat_ascii *UserIDIID of the BLOB owner on max 32 characters.
aat_ascii *QABlobO

BLOB resulting from the formatted answer hash, 358+1 characters, null-terminated containing :

  • User ID:                  32 chars
  • BLOB version:        02 chars
  • Hash number:           02 chars
  •                     |Index |02 chars
  •                     |Hash   |30 chars
  • Checksum:                 02 chars
aat_int32 *QABlobSizeI/O

In input, this parameter must indicate the size of the allocated buffer for the QABlob parameter (recommended 359 bytes).

In output, this parameter indicates the length of the QABlob string (without the null-terminated character).

Return codes

  Table: Return codes (AAL2QAGenQABlob)
CodeMeaningCodeMeaning
0Success535Invalid QA number
530Invalid QA data pointer541Invalid index list
532Invalid QA data length1025Buffer too small
533Invalid UserId pointer-1501Memory allocation failed
534Invalid UserId length