internal PCSCIso7816Protocol(byte[] atr, PCSCCard card) { // Reference the reader myCard = card; // Get the ATR value this.Atr = Atr.Parse(atr); // Map the PC/SC comms protocol to the appropriate CardFramework protocol switch (myCard.CommsProtocol) { case SCardProtocol.T0: CommsProtocol = Iso7816CommsProtocol.T0; break; case SCardProtocol.T1: CommsProtocol = Iso7816CommsProtocol.T1; break; case SCardProtocol.Raw: CommsProtocol = Iso7816CommsProtocol.Raw; break; default: throw PCSCException.ThrowUnsupportedProtocol(); } }
internal PCSCIso14443AProtocol(byte[] atr, PCSCCard card) : base(atr, card) { try { // Retrieve our UID CApdu command = new CApdu(0xFF, 0xCA, 0, le: 00); RApdu response = Transceive(command); if (response.IsError) { throw new InvalidOperationException("Error retrieving the Card UID"); } UID = response.Data; } catch (Exception) { // Some IFD's don't support UID retrieval } }
public PCSCMifareProtocol(PCSCCard card) { myCard = card; }
internal PCSCAttributes(PCSCCard card) { myCard = card; }