--- title: "AAL2GetMessageProperties" slug: "a3s-cppprg-aal2getmessageproperties-4-0" updated: 2026-11-11T09:57:24Z published: 2026-11-11T09:57:24Z canonical: "docs.onespan.com/a3s-cppprg-aal2getmessageproperties-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. # AAL2GetMessageProperties > The message properties retrieval functionality is applicable: > > - To hardware or software Digipass authenticators compliant with the multi-device two-step activation (in the context of multi-device licensing) and if the Secure Channel feature has been ordered (configured by OneSpan at the time of order). > - To hardware Digipass authenticators based on the single-device licensing model and able to perform operations based on the Secure Channel protocol. > > For more information, refer to the [Authentication Suite Server SDK Product Guide](/secsdks/docs/a3s-product-guide-4-0). ## Function prototype ```cpp aat_int32 AAL2GetMessageProperties ( aat_ascii *Message, aat_int32 *MessageProtocolVersion, aat_int32 *MessageType, aat_int32 *MessageProtectionType, aat_int32 *IsMessageEncrypted, aat_int32 *IsMessageSigned, aat_ascii *MessageSerial[11]); ``` ## Description This function is used to obtain information on a Secure Channel message (being a request message, a response message, or an information message). In case of success, the function will indicate the following: - Indication of the message protocol version - Indication of the message type - Indication of the message protection type - Indication if the message is encrypted or not - Indication if the message is signed (authenticity and integrity protection) or not - Indication of the serial number referenced into the message. ## Parameters | Type | Name | Use | Description | | --- | --- | --- | --- | | aat_ascii * | Message | I | Hexadecimal character string containing a request message, a response message, or an information message. The string length must be a multiple of 2 with a maximum length of 1070 characters. | | aat_int32 * | MessageProtocolVersion | 0 | Pointer on integer value; in output indicates the protocol version of the message. If set to NULL the MessageProtocolVersion property cannot be retrieved. | | aat_int32 * | MessageType | 0 | Pointer on integer value; in output indicates if the message is a request message, a response message, or an information message. - 0x3: request message - 0x23: response message - 0x3F: response error message. - 0x24: information message If set to NULL the MessageType property cannot be retrieved. | | aat_int32 * | MessageProtectionType | O | Pointer on integer value; in output indicates the protection type of the message. - 0x00: Unprotected (neither encrypted nor signed) - 0x01: Encrypted (AES-CTR 128 bits) and Signed (HMAC-SHA256) - 0x11: Signed (HMAC-SHA256) If set to NULL the MessageProtectionType property cannot be retrieved. | | aat_int32 * | IsMessageEncrypted | O | Pointer on integer value; in output indicates if the message body is encrypted or not. - 0: not encrypted - 1: encrypted If set to NULL the IsMessageEncrypted property cannot be retrieved. | | aat_int32 * | IsMessageSigned | 0 | Pointer on integer value; in output indicates if the message is signed (authenticity and integrity protection) or not. - 0: not signed - 1: signed If set to NULL the IsMessageSigned property cannot be retrieved. | | aat_ascii [11] | MessageSerial | 0 | 10 characters output string (+1 null terminator character) containing the serial number referenced into the message. | ## Return codes | Code | Meaning | Code | Meaning | | --- | --- | --- | --- | | 0 | Success | 1343 | Invalid information message length | | 1288 | Invalid serial number prefix | 1344 | Invalid request message length | | 1289 | Invalid serial number suffix | 1345 | Invalid request message protection type | | 1302 | AES CTR encryption failed | 1346 | Invalid message response protection type | | 1337 | Unsupported message protocol version | 1347 | Invalid information message protection type | | 1338 | Unsupported message type | 1354 | Invalid request message type | | 1339 | Invalid message length | 1355 | Invalid response message type | | 1340 | Invalid message pointer | 1360 | Invalid information message type | | 1341 | Message is not hexadecimal | 1362 | Invalid response message error length | | 1342 | Invalid response message length | | |