AAL2QAGenQAHashData

Prev Next

Function prototype

aat_int32 AAL2QAGenQAHashData (aat_ascii*     aQABlob,
                               aat_int32      SecurityLevel,
                               aat_ascii*     aQAIndexList,
                               aat_ascii*     aQAHashData);

Description

This function randomly extracts a list of question indexes and their matching answer hashes from a QA BLOB. The number of extracted indexes is the security level.

Parameters

  Table: Parameters (AAL2QAGenQAHashData)
TypeNameUseDescription
aat_ascii *QABlobI

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:                 16 chars
aat_int32SecurityLevelINumber of indexes and hashes to extract from the BLOB.
aat_ascii *aQAIndexListOList of randomly chosen question indexes. The number of indexes in the list is determined by the security level. Each index is on two characters. The list is null-terminated. With a security level of 3, the list will be ((3*2) +1) long (recommended buffer size is 21 bytes).
aat_ascii *aQAHashDataOList of matching answer hashes. The number of hashes in the list is determined by the security level. Each hash is on 30 characters. The list is null-terminated. With a security level of 3, the list will be ((3*30) +1) long (recommended buffer size is 321 bytes).

Return codes

  Table: Return codes (AAL2QAGenQAHashData)
CodeMeaningCodeMeaning
0Success541Invalid index list
412Invalid checksum542Invalid hash list
530Invalid QA data pointer1000Function does not support EMV-CAP
531Invalid QA security level1118Unsupported BLOB
532Invalid QA data length-1501Memory allocation failed
535Invalid QA number