- 23 Jan 2025
- 2 Minutes à lire
- SombreLumière
- PDF
AAL2GenHashDataBlock (function)
- Mis à jour le 23 Jan 2025
- 2 Minutes à lire
- SombreLumière
- PDF
Function prototype
aat_int32 AAL2GenHashDataBlock (
TDigipassBlob* DPData,
TKernelParms* CallParms,
aat_int32 EventWindow,
aat_int32 StartTime,
aat_int32 EndTime,
aat_byte* Salt,
aat_int32 SaltLength,
aat_word32 MaxRadomValue,
aat_byte* bKey,
aat_int32 KeyLength,
aat_byte* bHashDataBlock,
aat_int32* HashDataBlockLength);
Description
This function generates a hash data block for the event window or time period for the given authenticator application BLOB. The content of HashDataBlock is transparent to the caller and loaded into the client-side hash verification library.
The buffer for HashDataBlock must be allocated by the client prior to the function call. It is returned as a byte string in the following format:
- Serial number on 22 ASCII characters
- Data block size on 4 bytes
- Data block version on 2 bytes
- Maximum random diversifier on 4 bytes
- Start window on 4 bytes. It can be an event value or time indicated in seconds.
Number of hashes used on 4 bytes.
- Since Authentication Suite Server SDK 3.17.1, the maximum number of OTP hashes is 12000.
- Prior Authentication Suite Server SDK 3.17.1, the maximum number of OTP hashes was 3000.
- Data which contains the hashes list. Size of data is (number of hashes x 20) bytes
- CRC on 4 bytes
The allocated buffer size for bHashDataBlock must be (44 + (number of hashes x 20)) bytes. The number of hashes depends on the following parameters:
For event-based authenticators, the HashDataBlock buffer to allocate is (44 + (EventWindow x 20)) bytes.
The maximum value for EventWindow is 12000 since Authentication Suite Server SDK 3.17.1 and was 3000 for earlier versions.
For time-based authenticators, the HashDataBlock buffer to allocate is (44 + ( ( (EndTime – StartTime) / TimeStep) x 20)) bytes.
The maximum value for ( (EndTime – StartTime) / TimeStep) is 12000 since Authentication Suite Server SDK 3.17.1 and was 3000 for earlier versions.