How to change the card Historical Bytes?
Posted: Tue Dec 01, 2015 6:30 am
I know that changing Historical bytes is limited to Pre-Personalization step. But I found a method named setATRHistBytes in the GlobalPlatform APIs today.
This is description.
How can I use this method to change the card historical bytes? Can somebody give me any demo code?
This is description.
setATRHistBytes
public static boolean setATRHistBytes (byte[] buffer, short bOffset, byte bLength)
This method sets the historical bytes contained in the ATR (Answer To Reset). The sequence of bytes will be set
on a subsequent power-up or reset. Only the “default selected” Application may invoke this method. The Card
Manager locates the AID of the selected Application in the GlobalPlatform Registry and determines if the
Application has the required privilege.
Parameters:
buffer – byte[] Array containing the ATR historical bytes.
bOffset – short Offset within the buffer where ATR historical bytes begin.
bLength – byte Length of the ATR historical bytes in the buffer.
Returns:
TRUE if ATR bytes set, FALSE otherwise.
How can I use this method to change the card historical bytes? Can somebody give me any demo code?