--- title: "AAL2QAGenQAHashData" slug: "a3s-cppprg-aal2qagenqahashdata-4-0" updated: 2026-11-11T09:54:58Z published: 2026-11-11T09:54:58Z canonical: "docs.onespan.com/a3s-cppprg-aal2qagenqahashdata-4-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # AAL2QAGenQAHashData ## Function prototype ```cpp 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 | Type | Name | Use | Description | | --- | --- | --- | --- | | aat_ascii * | QABlob | I | 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_int32 | SecurityLevel | I | Number of indexes and hashes to extract from the BLOB. | | aat_ascii * | aQAIndexList | O | List 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 * | aQAHashData | O | List 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 | Code | Meaning | Code | Meaning | | --- | --- | --- | --- | | 0 | Success | 541 | Invalid index list | | 412 | Invalid checksum | 542 | Invalid hash list | | 530 | Invalid QA data pointer | 1000 | Function does not support EMV-CAP | | 531 | Invalid QA security level | 1118 | Unsupported BLOB | | 532 | Invalid QA data length | -1501 | Memory allocation failed | | 535 | Invalid QA number | | |