Verify apdu (programmable security code) – MagTek IntelliStripe65 99875161 User Manual

Page 95

Advertising
background image

Appendix B. Memory Card Support

89

CLA

INS

P1

P2

Lc

Data Field

D0

D8

Adr1

Adr0

Len

Data to be written

CLA is always D0

INS is always D8

P1 is upper byte of address to write and must not be greater than ‘03’

P2 is lower byte of address to write.

Lc is the number of bytes to write, 0-1024

Data Field contains the bytes to write. If a byte to be written is already protected, a status

6581 will be returned. Data is written first, then the Protect bit is written with
comparison, assuring that the data being protected is the data you wanted to
protect.


Response APDU:

SW1

SW2


Possible SW1/SW2 combinations:

SW1/SW2

Meaning

9000

Normal completion, no errors

6581

Memory Failure, some bytes were not written

6B00

Offset outside of the Memory (Combination of P2 and Lc is invalid)


Verify APDU (Programmable Security Code)

Because of card functionality, this APDU should not be sent until at least one Read Binary
APDU has been sent first.


Command APDU:

CLA

INS

P1

P2

Lc

Data Field

00

20

00

00

Len

Data to be verified

CLA is always 00

INS is always 20

P1 is 00

P2 is 00

Lc is the number of bytes for verification:

If the value is 00, the status 63Cx will be returned where x indicates the number
of further retries allowed. This mode does not
If the value is the one less than the value of Property A7, the PSC contained in the
Data Field will be presented for verification.

use up an attempt!

Response APDU:

SW1

SW2

Advertising