# MTSCRA Class Methods - 41 - 50

#### getCardEncodeType

Retrieves the card encode type.

public string getCardEncodeType()

Parameters: None Return Value:

String representing the card encode type.

Card Encode Type

This is a string value which indicates the type of encoding that was found on the card. The following table defines the possible values.

<table data-header-hidden><thead><tr><th width="89" valign="top"></th><th width="143" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Value</td><td valign="top">Encode Type</td><td valign="top">Description</td></tr><tr><td valign="top">00</td><td valign="top">ISO/ABA</td><td valign="top">ISO/ABA encode format. At least one track in ISO/ABA format, Track 3 not AAMVA format.</td></tr><tr><td valign="top">01</td><td valign="top">AAMVA</td><td valign="top">AAMVA encode Track 3 is AAMVA format. Tracks 1 and 2 are ISO/ABA if correctly decoded.</td></tr><tr><td valign="top">02</td><td valign="top">Reserved</td><td valign="top"> </td></tr><tr><td valign="top">03</td><td valign="top">Blank</td><td valign="top">The card is blank. Only occurs if all tracks decode without error and without data.</td></tr><tr><td valign="top">04</td><td valign="top">Other</td><td valign="top">The card has a non-standard encode format. For example, ISO/ABA track 1 format on track 2.</td></tr><tr><td valign="top"><p> </p><p>05</p></td><td valign="top"><p> </p><p>Undetermined</p></td><td valign="top">The card encode type could not be determined because no tracks could be decoded. (Combination of Error tracks and Blank Tracks, at least one Error track).</td></tr><tr><td valign="top"><p> </p><p>06</p></td><td valign="top"><p> </p><p>None</p></td><td valign="top">No decode has occurred. This type occurs if no magnetic stripe data has been acquired since the data has been cleared or since the reader was powered on. This reader only sends an Input report when a card has been swiped so this value will never occur.</td></tr></tbody></table>

#### getDataFieldCount <a href="#id-4.42_getdatafieldcount" id="id-4.42_getdatafieldcount"></a>

Retrieves data field count.

public int getDataFieldCount()

Parameters: None

Return Value:

Data field count

#### getHashCode <a href="#id-4.43_gethashcode" id="id-4.43_gethashcode"></a>

Retrieves SHA-x hash code.

public string getHashCode()

Parameters: None Return Value:

String representing SHA-x hash code.

#### getDeviceConfig <a href="#id-4.44_getdeviceconfig" id="id-4.44_getdeviceconfig"></a>

Retrieves device configuration.

public string getDeviceConfig(string configType)

Parameters:

configType can be one of:

* 8180: Send TLV Version on Power Up
* 8181: Send Discovery on Power Up
* 8280: Send Card name
* 8281: Send Card IIN
* 8282: Send Card Last 4 Digits of PAN
* 8283: Send Card Expiration
* 8284: Send Card Service Code
* 8285: Send Card PAN Length

Return Value:

String representing device configuration.

#### getEncryptionStatus <a href="#id-4.45_getencryptionstatus" id="id-4.45_getencryptionstatus"></a>

Retrieves encryption status. This two-byte Binary field contains the Encryption Status. The Reader Encryption Status is sent in big endian byte order. Byte 1 is the least significant byte. Byte 1 LSB is status bit 0. Byte 2 MSB is status bit 15.

public string getEncryptionStatus()

Parameters: None Return Value:

String representing decryption status as a 2-byte binary field.

* Bit 0 = DUKPT Keys exhausted (1=exhausted, 0=keys available)
* Bit 1 = Initial DUKPT key Injected, always set to One (Primary DUKPT Key)
* Bit 2 = Encryption Enabled, always set to One
* Bit 3 = Reserved (always set to zero)&#x20;
* Bit 4 = Reserved (always set to zero)
* Bit 5 = Reserved (always set to zero)
* Bit 6 = Reserved (always set to zero)
* Bit 7 = Reserved (always set to zero)
* Bit 8 = Reserved (always set to zero)
* Bit 9 = Initial DUKPT key injected (Secondary DUKPT Key)
* Bit 10 = DUKPT Key used for encryption, 0=Primary, 1=Secondary
* Bit 11 = DUKPT Key Variant used to encrypt data, 0=PIN Variant, 1=Data Variant/Bidirectional
* Bits 12–15 = Unassigned (always set to Zero)

#### getFirmware <a href="#id-4.46_getfirmware" id="id-4.46_getfirmware"></a>

Retrieves firmware version.

public string getFirmware()

Parameters: None&#x20;

Return Value:

String representing firmware version.

#### getMagTekDeviceSerial <a href="#id-4.47_getmagtekdeviceserial" id="id-4.47_getmagtekdeviceserial"></a>

Retrieves MagTek device serial number.

public string getMagTekDeviceSerial()

Parameters: None&#x20;

Return Value:

String representing MagTek device serial number.

#### getResponseData <a href="#id-4.48_getresponsedata" id="id-4.48_getresponsedata"></a>

Retrieves response data.

public string getResponseData()

Parameters: None&#x20;

Return Value:

String representing response data.

#### getResponseType <a href="#id-4.49_getresponsetype" id="id-4.49_getresponsetype"></a>

Retrieves response type.

public string getResponseType()

Parameters: None&#x20;

Return Value:

String representing response type. For Audio Reader, always “C101”.

#### getTagValue <a href="#id-4.50_gettagvalue" id="id-4.50_gettagvalue"></a>

Retrieves the value of the specified tag.

public string getTagValue(string tag, string data)

* Parameters: None&#x20;
  * tag
    * Tag to search for&#x20;
  * data&#x20;
    * Data to search from

Return Value: String representing tag value.


---

# 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-.net-pcl/mtscra-class-methods/mtscra-class-methods-41-50.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.
