public static void GeneralAuthenticateMifare(ISmartCardReader smartCardReader, string description, byte blockNumber, GeneralAuthenticateCommand.MifareKeyType keyType, byte keySlot) { var generalAuthenticateCommand = new Readers.AViatoR.Components.GeneralAuthenticateCommand(); string input = generalAuthenticateCommand.GetMifareApdu(blockNumber, keyType, keySlot); string output = smartCardReader.Transmit(input); ConsoleWriter.Instance.PrintCommand(description + keySlot.ToString("X2"), input, output); }
public static void GeneralAuthenticateiClass(ISecureChannel secureChannel, string description, BookNumber book, PageNumber page, GeneralAuthenticateCommand.ImplicitSelection implicitSelection, GeneralAuthenticateCommand.iClassKeyType keyType, byte keySlot) { var generalAuthenticateCommand = new Readers.AViatoR.Components.GeneralAuthenticateCommand(); string input = generalAuthenticateCommand.GetiClassApdu(book, page, implicitSelection, keyType, keySlot); string output = secureChannel.SendCommand(input); ConsoleWriter.Instance.PrintCommand(description + keySlot.ToString("X2"), input, output); }
public static void GeneralAuthenticateMifare(ISmartCardReader smartCardReader, byte blockNumber, GeneralAuthenticateCommand.MifareKeyType keyType, byte keySlot) { var generalAuthenticateCommand = new Readers.AViatoR.Components.GeneralAuthenticateCommand(); string input = generalAuthenticateCommand.GetMifareApdu(blockNumber, keyType, keySlot); string output = smartCardReader.Transmit(input); Console.WriteLine($"0x {blockNumber.ToString("X2")} Input {input} Output: {output}"); }