private void SendWriteDataCommand(SamSecureSession session, byte fileNumber, string offset, string dataToBeWritten, SEPCommand.CommunicationMode communicationMode, SEPCommand.CommitFlag commitFlag) { var command = new SEPDESFireWriteData(); var input = command.GetApdu(fileNumber, offset, dataToBeWritten, communicationMode, commitFlag); var output = session.SendCommand(input); var response = command.TranslateResponse(output); PrintCommand("Write Data", input, output, response); }
private void SendReadDataCommand(SamSecureSession session, byte fileNumber, string offset, byte numberOfBytesToBeRead, SEPCommand.CommunicationMode communicationMode) { var command = new SEPDESFireReadData(); var input = command.GetApdu(fileNumber, offset, numberOfBytesToBeRead, communicationMode); var output = session.SendCommand(input); var response = command.TranslateResponse(output); PrintCommand("Read Data", input, output, response); PrintDetailedResponse(response); }
private void SendCreateStandardDataFileCommand(SamSecureSession session, byte fileNumber, SEPCommand.CommunicationMode communicationMode, string accessRights, string fileSize) { var command = new SEPDESFireCreateStandardDataFile(); var input = command.GetApdu(fileNumber, communicationMode, accessRights, fileSize); var output = session.SendCommand(input); var response = command.TranslateResponse(output); PrintCommand("Create Standard Data File", input, output, response); }