# MTSCRA Class Methods - 11 - 20

#### getTrack2

Get stored track2 data. This field contains the encrypted track data for track 2.

```
public String getTrack2()
```

Parameters: None&#x20;

Return Value:

Return stored track2 data string.

#### getTrack3 <a href="#id-3.12_gettrack3" id="id-3.12_gettrack3"></a>

Get stored track3 data. This field contains the encrypted track data for track 3.

```
public String getTrack3()
```

Parameters: None&#x20;

Return Value:

Return stored track3 data string.

#### getTrack1Masked <a href="#id-3.13_gettrack1masked" id="id-3.13_gettrack1masked"></a>

Get stored masked track1 data.

```
public String getTrack1Masked()
```

Parameters: None Return Value:

Return stored masked track1 data string.

For an ISO/ABA card, the PAN is masked as follows:

* The specified number of initial characters is sent unmasked. The specified number of trailing characters is sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
* The Card Holder’s name and the Expiration Date are transmitted unmasked.
* All Field Separators are sent unmasked.
* All other characters are set to the specified mask character.

For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.

#### getTrack2Masked <a href="#id-3.14_gettrack2masked" id="id-3.14_gettrack2masked"></a>

Get stored masked track2 data.

```
public String getTrack2Masked()
```

Parameters: None&#x20;

Return Value:

Return stored masked track2 data string.

&#x20;For an ISO/ABA card, the PAN is masked as follows:

* The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.&#x20;
* The Expiration Date is transmitted unmasked.
* All Field Separators are sent unmasked.
* All other characters are set to the specified mask character.

For an AAMVA card, the DL/ID# is masked as follows:

* The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the DL/ID#PAN are set to zero; one of them will be set such that last digit of the DL/ID# calculates an accurate Mod 10 check of the rest of the DL/ID# as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the DL/ID# are set to the specified mask character.&#x20;
* The Expiration Date and Birth Date are transmitted unmasked.
* All other characters are set to the specified mask character.

#### getTrack3Masked <a href="#id-3.15_gettrack3masked" id="id-3.15_gettrack3masked"></a>

Get stored masked track3 data.

```
public String getTrack3Masked()
```

Parameters: None&#x20;

Return Value:

Return stored masked track3 data string.

For an ISO/ABA card, the PAN is masked as follows:

* The specified number of initial characters are sent unmasked. The specified number of trailing characters are sent unmasked. If Mod 10 correction is specified, all but one of the intermediate characters of the PAN are set to zero; one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted. If the Mod 10 correction is not specified, all of the intermediate characters of the PAN are set to the specified mask character.
* All Field Separators are sent unmasked.
* All other characters are set to the specified mask character.

For an AAMVA card, the specified mask character is substituted for each of the characters read from the card.

#### getMagnePrint <a href="#id-3.16_getmagneprint" id="id-3.16_getmagneprint"></a>

Not supported on aDynamo. This 128 byte Binary field contains the MagnePrint data. Only the number of bytes specified in the MagnePrint data length field are valid. The least significant bit of the first byte of data in this field corresponds to the first bit of MagnePrint data. If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.

```
public String getMagnePrint()
```

Parameters: None&#x20;

Return Value:

String containing the MagnePrint data.

#### getMagnePrintStatus <a href="#id-3.17_getmagneprintstatus" id="id-3.17_getmagneprintstatus"></a>

Not supported on aDynamo. Get the card MagnePrint status. For more information, see *D9875475*

```
public String getMagnePrintStatus()
```

Parameters: None&#x20;

Return Value:

String containing the MagnePrint status.

This Binary field represents 32 bits of MagnePrint status information. Each character represents 4 bits (hexadecimal notation). For example, suppose the characters are: “A1050000”:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td valign="top">Nibble</td><td valign="top">1</td><td valign="top">2</td><td valign="top">3</td><td valign="top">4</td><td valign="top">5</td><td valign="top">6</td><td valign="top">7</td><td valign="top">8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td valign="top">Value</td><td valign="top">A</td><td valign="top">1</td><td valign="top">0</td><td valign="top">5</td><td valign="top">0</td><td valign="top">0</td><td valign="top">0</td><td valign="top">0</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td valign="top">Bit</td><td valign="top">7</td><td valign="top">6</td><td valign="top">5</td><td valign="top">4</td><td valign="top">3</td><td valign="top">2</td><td valign="top">1</td><td valign="top">0</td><td><p>1</p><p>5</p></td><td><p>1</p><p>4</p></td><td><p>1</p><p>3</p></td><td><p>1</p><p>2</p></td><td><p>1</p><p>1</p></td><td><p>1</p><p>0</p></td><td>9</td><td>8</td><td><p>2</p><p>3</p></td><td><p>2</p><p>2</p></td><td><p>2</p><p>1</p></td><td><p>2</p><p>0</p></td><td><p>1</p><p>9</p></td><td><p>1</p><p>8</p></td><td><p>1</p><p>7</p></td><td><p>1</p><p>6</p></td><td><p>3</p><p>1</p></td><td><p>3</p><p>0</p></td><td><p>2</p><p>9</p></td><td><p>2</p><p>8</p></td><td><p>2</p><p>7</p></td><td><p>2</p><p>6</p></td><td><p>2</p><p>5</p></td><td><p>2</p><p>4</p></td></tr><tr><td valign="top">Value</td><td valign="top">1</td><td valign="top">0</td><td valign="top">1</td><td valign="top">0</td><td valign="top">0</td><td valign="top">0</td><td valign="top">0</td><td valign="top">1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>1</td><td>0</td><td>1</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td valign="top">Usage*</td><td valign="top">R</td><td valign="top">R</td><td valign="top">R</td><td valign="top">R</td><td valign="top">R</td><td valign="top">R</td><td valign="top">R</td><td valign="top">M</td><td>R</td><td>R</td><td>R</td><td>R</td><td>R</td><td>R</td><td>R</td><td>R</td><td>0</td><td>0</td><td>D</td><td>0</td><td>F</td><td>L</td><td>N</td><td>S</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table>

Usage Legend:

* D = Direction
* F = Too Fast
* L = Too Slow
* M = MagnePrint capable
* N = Too Noisy
* R =Revision

This four-byte field contains the MagnePrint status. The MagnePrint status is in little endian byte order. Byte 1 is the least significant byte. Byte 1 LSB is status bit 0. Byte 4 MSB is status bit 31. MagnePrint status is defined as follows:

* Bit 0 = MagnePrint-capable product (usage M)
* Bits 1-15 = Product revision & mode (usage R)
* Bit 16 = STATUS-only state (usage S)&#x20;
* Bit 17 = Noise too high or “move me” away from the noise source (used only in STATUS) (usage N)
* Bit 18 = Swipe too slow (usage L)
* Bit 19 = Swipe too fast (usage F)
* Bit 20 = Unassigned (always set to Zero)
* Bit 21 = Actual Card Swipe Direction (0 = Forward, 1 = Reverse) (usage D)
* Bits 22-31 = Unassigned (always set to Zero)

If the Enable/Disable MagnePrint property is set to disable MagnePrint, this field will not be sent.

#### getDeviceSerial <a href="#id-3.18_getdeviceserial" id="id-3.18_getdeviceserial"></a>

Get stored device serial number. This 16-byte ASCII field contains the device serial number. The device serial number is a NUL (zero) terminated string. So the maximum length of the device serial number, not including the null terminator, is 15 bytes. This device serial number can also be retrieved and set with the device serial number property explained in the property section of this document. This field is stored in non-volatile memory, so it will persist when the unit is power cycled.

```
public String getDeviceSerial()
```

Parameters: None&#x20;

Return Value:

Return stored device serial number.

#### getSessionID <a href="#id-3.19_getsessionid" id="id-3.19_getsessionid"></a>

Not suported on aDynamo. This 8-byte Binary field contains the encrypted version of the current Session ID. Its primary purpose is to prevent replays. After a card is read, this property will be encrypted, along with the card data, and supplied as part of the transaction message. The clear text version of this will never be transmitted. To avoid replay, the application sets the Session ID property before a transaction and verifies that the Encrypted Session ID returned with card data decrypts to the value set.

public String getSessionID()

Parameters: None&#x20;

Return Value:

Returns a string containing the session id.

#### getKSN <a href="#id-3.20_getksn" id="id-3.20_getksn"></a>

Get stored key serial number. This 10-byte Binary field contains the DUKPT Key Serial Number used to encrypt the encrypted fields in this message. This 80-bit field includes the Initial Key Serial Number in the leftmost 59 bits and a value for the Encryption Counter in the rightmost 21 bits. If no keys are loaded, all bytes will have the value 0x00.

public String getKSN()

Parameters: None&#x20;

Return Value:

Return stored key serial number.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.magtek.com/hardware/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-android/mtscra-class-methods/mtscra-class-methods-11-20.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
