# Smart Card Shell

- - Home
- - GPError
  - GPSystem
  - ByteString
  - ByteBuffer
  - TLV
  - TLVList
  - Card
  - Atr
  - Key
  - Crypto
  - Application
  - GPApplication
  - GPSecDomain
- - ASN1
  - CardFile
  - IsoSecureChannel
  - ApplFactory
  - GPXML
  - JsScript
  - CardSim
- - X509
  - CRL
  - KeyStore
  - Signed CMS
  - Enveloped CMS
  - CMS Generator
  - XMLSignature
  - SSS
  - OCSPQuery
  - LDAP
  - SOAP
  - URLConnection
- - PKCS11Provider
  - PKCS11Session
  - PKCS11Object
- - OutlineNode
  - Dialog
  - Task
- - Tools
  - Modules
- - OpenSCDP

# Atr - Reference Documentation

## Index of Methods

- Atr() constructor
- toByteString()
- toString()

## Properties

Type | Name | Description
--- | --- | ---
Number | formatByte | Format byte from ATR returned by ICC (2.Byte)
ByteString | historicalBytes | Historical bytes
ByteString | interfaceBytes | Interface bytes
Number | tckByte | Check byte (T=0, T=1) or word (T=CL)

## Constructor

### Prototype

Atr(ByteString atr)

### Description

Validate and decode ATR

### Arguments

Type | Name | Description
--- | --- | ---
`ByteString` | atr | ATR

### Exceptions

Name | Value | Description
--- | --- | ---
GPError | GPError.ARGUMENTS_MISSING | Too few arguments in call
GPError | GPError.INVALID_ARGUMENTS | Too many arguments in call
GPError | GPError.INVALID_TYPE | Type of argument is invalid for call
GPError | GPError.INVALID_DATA | ATR is invalid

### Example

    atr = new Atr(new ByteString("3BBD18008131FE45805102670414B1010102008105", HEX));

    print(atr);
    print(atr.formatByte);
    print(atr.historicalBytes);
    print(atr.interfaceBytes);
    print(atr.tckByte);

    atr = new Atr(new ByteString("A2131088", HEX));
    print(atr);
    atr = new Atr(new ByteString("92231088", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B85004934313000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B840034310100", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B8A813140434D49434152444F313331", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B8A81314F4395010190900900012091", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B8481014D538102", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B85004D46430110", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B600000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B91948031FE4966", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BF39400FF80B1FE491F034D3253", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B91948031FE4967", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BF89400FF80B1FE451F03D276000028FF051A", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BF31100FF80B1F0491F034C454F", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BFD9400FF80B1FE451F030068D276000028FF051E009000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BFF9400FF80B1FE451F030068D276000028FF051E3180009000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BFD9400FF80B1FE451F030068D276000028FF0524009000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BFF9400FF80B1FE451F030068D276000028FF05243180009000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BFD9400FF80B1FE451F030068D276000028FF0523009000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BFF9400FF80B1FE451F030068D276000028FF05233180009000", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BEF00FF813152454D46432049424D2034304839363031", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BEF00FF81315045656308041302500002000000010120", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B6F00008031E06B8034030103038034555555", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B6F00008031E06B8403030406555555555555", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BEF00FF813150456563080B4002800008187002010400", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBB18008131FE4580670412B0020182018105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBB18008131FE4580670414B0010182018105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBD18008131FE45805102670412B0020182208105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBD18008131FE45805101670412B0020182208105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BFF1800FF8131FE45454C435F56312E3020202020202020", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBD18008131FE45805102670414B1010182038105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBD18008131FE45805101670414B1010182038105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBD18008131FE45805102670414B1010182108105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BBD18008131FE45805101670414B1010182108105", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B9F1881B1FE451FC3006D05A3010031B873B7B5DB009000A9", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B00", HEX));
    print(atr);
    atr = new Atr(new ByteString("3F00", HEX));
    print(atr);
    atr = new Atr(new ByteString("3BF0FFFFFFF0FFFFFFF1FFFFFFF0FFFFFFFFFFFFFF00", HEX));
    print(atr);
    atr = new Atr(new ByteString("3B8001", HEX));
    print(atr);

## toByteString()

### Prototype

ByteString toByteString()

### Description

Return the encoded ATR as ByteString object

### Return

`ByteString` | ATR

### Exceptions

Name | Value | Description
--- | --- | ---
GPError | GPError.INVALID_ARGUMENTS | Too many arguments in call

### Example

    bs = new ByteString("3BBD18008131FE45805102670414B1010102008105", HEX)
    atr = new Atr(bs);
    assert(atr.toByteString().equals(bs));

## toString()

### Prototype

String toString()

### Description

Return the ATR in human readable format

### Return

`String` | Decoded ATR

### Exceptions

Name | Value | Description
--- | --- | ---
GPError | GPError.INVALID_ARGUMENTS | Too many arguments in call

### Example

    bs = new ByteString("3BBD18008131FE45805102670414B1010102008105", HEX)
    atr = new Atr(bs);
    val = atr.toString();

© Copyright 2003 - 2026 CardContact Systems GmbH , Minden, Germany