--- title: "C type definitions and declarations" slug: "a3s-cppprg-oam-c-type-definitions-and-declarations-4-0" updated: 2026-11-11T09:50:13Z published: 2026-11-11T09:50:13Z canonical: "docs.onespan.com/a3s-cppprg-oam-c-type-definitions-and-declarations-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. # C type definitions and declarations ## Common C type definitions To better indicate their use and ensure code portability, some common C types have been redefined. ```cpp Typedef char aat_ascii; Typedef unsigned char aat_byte; Typedef short int aat_int16; Typedef long int aat_int32; Typedef unsigned short int aat_uint16; Typedef unsigned long int aat_word32; Typedef short int aat_bool; enum aat_bool {    aat_false False=0,    aat_true True=1 }; ``` ## HashDataBlock (structure) `HashDataBlock` is the logical hash data block structure. The size of the block may vary. ```cpp /* HashDataBlock */ {    aat_byte SerialNumber[22], /* ASCII */    aat_byte DataBlockSize[4],    aat_byte DataBlockVersion[2],    aat_byte MaxRandomDiv[4],    aat_byte StartWindows[4], /* (Can be an event value or time expressed in number of seconds). */    aat_byte HashNb[4]=X,    aat_byte Data[X][20],    aat_byte CRC[4] } ``` ## StateDataBlock (structure) `StateDataBlock` is the logical state data block structure. ```cpp /* StateDataBlock */ {    aat_byte SerialNumber[22], /* ASCII */    aat_byte DataBlockSize[4],    aat_byte DataBlockVersion[2],    aat_byte Status[1],    aat_byte StaticPINLen[1],    aat_byte OTPLen[1],    aat_byte OTPFormat[1],    aat_byte CodeWord[4],    aat_byte LastUsedValue[4], /* (Can be an event value or time expressed in number of seconds). */    aat_byte LastTimeShift[4],    aat_byte ErrorCount[4],    aat_byte UseCount[4],    aat_byte StaticPINDelta[8],    aat_byte CRC[4] } ```