Function prototype
aat_int32 AAL2DPXInit( TDPXHandle* dpx_Handle,
aat_ascii* pFileName,
aat_ascii* InitKey,
aat_int16* appl_count,
aat_ascii* appl_names,
aat_int16* token_count);
Description
This function is used to initialize the import process of a DIGIPASS export file (DPX) file, which involves the following steps:
- Opening the DPX file, using its name (pFileName)
- Verifying the software transport key (InitKey)
- Initializing the handle dpx_Handle
- Returning the number of applications defined in the DPX file into appl_count, the list of application names into appl_names, and the total number of defined Digipass authenticators into token_count.
Parameters
Table: Parameters (AAL2DPXInit) | Type | Name | Use | Description |
|---|
| TDPXHandle * | dpx_Handle | O | Handle pointer used during the DPX file import operation. This block must be acquired by the calling application, and will be initialized by this function. It must be passed to other functions working on the DPX file such as AAL2DPXGetToken, AAL2DPXGetStaticVector, or AAL2DPXClose. |
| aat_ascii * | pFileName | I | Path to the DPX file to open. Only characters of the 7-bit ASCII printable character set are supported. |
| aat_ascii * | InitKey | I | A string of 32 or 64 hexadecimal digits representing the DPX file software transport key. |
| aat_int16 * | appl_count | O | Points to a short integer where the function returns the number of applications described in the DPX file. The application names are listed in the appl_names parameter. |
| aat_ascii * | appl_names | O | Points to a 96 + 1-byte area where the function returns the list of available application names. Each application name has a fixed length of 12 characters, left-aligned and padded with spaces, if necessary. The list contains a maximum of 8 application names (recommended buffer size is 97 bytes). |
| aat_int16 * | token_count | O | Points to a short integer where the function returns the number of Digipass authenticators contained in this DPX file. |
Return codes
Table: Return codes (AAL2DPXInit) | Code | Meaning | Code | Meaning |
|---|
| 0 | Success | -103 | Error DH created by content |
| -10 | Error null pointer | -200 | Error DC HSH content |
| -11 | Error bad argument | -201 | Error DC DEL content |
| -12 | Error DPX clear failed | -203 | Error DEL value |
| -13 | Error DES calculation | -300 | Error DF field name |
| -14 | Error InitKey length | -301 | Error DF descriptor |
| -15 | Error InitKey value | -400 | Error DA record |
| -20 | Error file open failed | -501 | Error Digipass descriptor |
| -22 | Error file rewind failed | -502 | Error Digipass unknown descriptor |
| -23 | Error file not open | -800 | Error CT field type |
| -24 | Error file not closed | -900 | Error DE DEF records content |
| -30 | Error fatal error | -901 | Error DE data records content |
| -32 | Error too many errors | -902 | Error DE tokens content |
| -40 | Error void text | -1500 | Cannot allocate memory |
| -42 | Error no DF records | -1501 | Handle pointer is null |
| -45 | Error unexpected content | -1508 | InitKey pointer is null |
| -46 | Error line exhausted | -1509 | File name pointer is null |
| -47 | Error missing quotes | -1511 | Application count pointer is null |
| -48 | Error missing field name | -1512 | Application name pointer is null |
| -49 | Error bad field name | -1513 | Token count pointer is null |
| -50 | Error bad field type | -1523 | Invalid response length with Digipass algorithm in DPX |
| -51 | Error field size | -1524 | Invalid return host code length with Digipass algorithm in DPX |
| -100 | Error DH file content | -1532 | Invalid timer unit for OCRA in DPX |
| -101 | Error DH date content | -1533 | Invalid response or host code length in DPX |
| -102 | Error DH version content | | |