コード例 #1
0
            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);
            }
コード例 #2
0
            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);
            }
コード例 #3
0
            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);
            }