Section 1. application messages, Overview, Data security – MagTek IntelliStripe65 99875161 User Manual
Page 7: Message format, Message header

1
SECTION 1. APPLICATION MESSAGES
This section describes the format of application messages and defines the protocol for using
these messages.
OVERVIEW
Application messages are the blocks of information exchanged between two applications. They
consist of a header and data. The message format and contents are independent of the transport
mechanism by which the messages are exchanged. Each message has a length that is provided
by the transport mechanism for messages being received or is supplied to the transport
mechanism for messages being transmitted. The transport mechanism is outside the scope of this
document.
DATA SECURITY
Some devices support an optional mechanism for securing message data using
encryption/decryption. The message elements involved in data security are the encryption flag
and pad length bits of the message type field and the message data field. Data security is
controlled with the system data encryption command and the key injection command in the
device application.
There is no special data decryption command. When the host sends a application message
command request to the device, if the message header’s message type byte’s encryption flag bit
is set, the device will regard the following data as encrypted, the device will decrypt the data
automatically and send it to the correct application.
MESSAGE FORMAT
The following diagram illustrates the message format:
MTYP
APPL
CMND
RC
DATA
Message Header
The message header contains four one-byte fields: Message Type, Application ID, Command ID
and Result Code. The header is followed by zero or more bytes of data. The existence and
format of the data depends on the Application ID and Command ID. The following sections
describe each field of the header.