> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/sdks-and-tools/sdks-and-software-libraries/magnesafe-v5-sdks/programmers-manual-android/mtscra-class-methods/mtscra-class-methods-41-50.md).

# MTSCRA Class Methods - 41 - 50

## &#x20;getDataFieldCount

Retrieves data field count.

{% code overflow="wrap" %}

```
public int getDataFieldCount()
```

{% endcode %}

Parameters: None Return Value:

Data field count

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

Retrieves SHA-x hash code.

{% code overflow="wrap" %}

```
public String getHashCode()
```

{% endcode %}

Parameters: None Return Value:

String representing SHA-x hash code.

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

Retrieves device configuration.

{% code overflow="wrap" %}

```
public String getDeviceConfig(String configType)
```

{% endcode %}

Parameters:

<table data-header-hidden><thead><tr><th width="131.66668701171875" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top"><p> </p><p> </p><p> </p><p> </p><p>configType</p></td><td valign="top"><p>configType can be one of:</p><p> </p><ul><li>8180: Send TLV Version on Power Up </li><li>8181: Send Discovery on Power Up </li><li>8280: Send Card name</li><li>8281: Send Card IIN</li><li>8282: Send Card Last 4 Digits of PAN </li><li>8283: Send Card Expiration</li><li>8284: Send Card Service Code </li><li>8285: Send Card PAN Length</li></ul></td></tr></tbody></table>

Return Value:

String representing device configuration.

## getEncryptionStatus <a href="#id-3.44_getencryptionstatus" id="id-3.44_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.

{% code overflow="wrap" %}

```
public String getEncryptionStatus()
```

{% endcode %}

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)
* 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-3.45_getfirmware" id="id-3.45_getfirmware"></a>

Retrieves firmware version.

{% code overflow="wrap" %}

```
public String getFirmware()
```

{% endcode %}

Parameters: None Return Value:

String representing firmware version

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

Retrieves MagTek device serial number.

{% code overflow="wrap" %}

```
public String getMagTekDeviceSerial()
```

{% endcode %}

Parameters: None Return Value:

String representing MagTek device serial number

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

Retrieves response data.

{% code overflow="wrap" %}

```
public String getResponseData()
```

{% endcode %}

Parameters: None Return Value:

String representing response data.

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

Retrieves response type.

{% code overflow="wrap" %}

```
public String getResponseType()
```

{% endcode %}

Parameters: None Return Value:

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

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

Retrieves the value of the specified tag.

{% code overflow="wrap" %}

```
public String getTagValue(String tag, String data)
```

{% endcode %}

Parameters:

<table data-header-hidden><thead><tr><th width="130.33331298828125" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">tag</td><td valign="top">Tag to search for.</td></tr><tr><td valign="top">data</td><td valign="top">Data to search from.</td></tr></tbody></table>

Return Value:

String representing tag value.

## getTLVVersion <a href="#id-3.50_gettlvversion" id="id-3.50_gettlvversion"></a>

Retrieves TLV version.

{% code overflow="wrap" %}

```
public String getTLVVersion()
```

{% endcode %}

Parameters: None Return Value:

String representing TLV version as a two-byte hex string


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.magtek.com/sdks-and-tools/sdks-and-software-libraries/magnesafe-v5-sdks/programmers-manual-android/mtscra-class-methods/mtscra-class-methods-41-50.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
