> 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/products/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-.net-pcl/mtscra-class-methods/mtscra-class-methods-21-30.md).

# MTSCRA Class Methods - 21 - 30

#### getKSN

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 Return Value:

Return stored key serial number.

#### getDeviceName <a href="#id-4.22_getdevicename" id="id-4.22_getdevicename"></a>

Get device model name.

public string getDeviceName()

Parameters: None

Return Value:

Return device model name.

#### clearBuffers <a href="#id-4.23_clearbuffers" id="id-4.23_clearbuffers"></a>

Clears buffered data retrieved from the reader.&#x20;

public void clearBuffers()&#x20;

Parameters: None

Return Value: None

#### getBatteryLevel <a href="#id-4.24_getbatterylevel" id="id-4.24_getbatterylevel"></a>

Retrieves battery level.

public long getBatteryLevel()

Parameters: None Return Value:

Battery Level (0 to 100)

#### getSwipeCount <a href="#id-4.25_getswipecount" id="id-4.25_getswipecount"></a>

Retrieves swipe count.

public long getSwipeCount()

Parameters: None&#x20;

Return Value:

Long value representing swipe count. If the value is less than zero, it indicates the device does not support tracking of the number of card swipes.

#### getCapMagnePrint <a href="#id-4.26_getcapmagneprint" id="id-4.26_getcapmagneprint"></a>

Retrieves MagnePrint Capabilities.

public string getCapMagnePrint()

Parameters: None Return Value:

String representing MagnePrint capabilities:

* 0 = No MagnePrint,&#x20;
* 1 = Short MagnePrint,
* 2 = Long MagnePrint

#### getCapMagnePrintEncryption <a href="#id-4.27_getcapmagneprintencryption" id="id-4.27_getcapmagneprintencryption"></a>

Retrieves MagnePrint Encryption Capabilities.

public string getCapMagnePrintEncryption()

Parameters: None Return Value:

String representing MagnePrint Encryption capabilities:

* 0 = No Encryption,
* 1 = Same as MagStripe (8122), other values TBD.

If absent, the default value is 1.

#### getCapMagneSafe20Encryption <a href="#id-4.28_getcapmagnesafe20encryption" id="id-4.28_getcapmagnesafe20encryption"></a>

Retrieves MagneSafe 2.0 Encryption Capabilities.

public string getCapMagneSafe20Encryption ()

Parameters: None&#x20;

Return Value:

String representing MagneSafe 2.0 Encryption Capabilities. 0 = Not supported, other values TBD.

#### getCapMagStripeEncryption <a href="#id-4.29_getcapmagstripeencryption" id="id-4.29_getcapmagstripeencryption"></a>

Retrieves MagneStripe Encryption Capabilities.

public string getCapMagStripeEncryption()

Parameters: None Return Value:

String representing MagStripe Encryption Capabilities. 0 = No Encryption, 1 = TDES DUKPT / PIN Variant, other values TBD

#### 1.10    getCapMSR <a href="#id-4.30_getcapmsr" id="id-4.30_getcapmsr"></a>

Retrieves MSR Capabilities. public string getCapMSR() Parameters: None

Return Value:

String representing MSR Capabilities. 0 = No MSR, 1 = MSR.


---

# 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/products/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-.net-pcl/mtscra-class-methods/mtscra-class-methods-21-30.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.
