コード例 #1
0
ファイル: VirtualDevice.cs プロジェクト: ldcm3/PinPadEmulator
        private void OnLinkCommandReceived(string command)
        {
            this.Reply(ByteFlag.PACKET_ACKNOWLEDGE);
            var cryptoHandled = this.CryptographyHandler.Handle(command);

            if (cryptoHandled != null)
            {
                this.Reply(Checksum.Encapsulate(cryptoHandled.ToString()).ToArray());
                return;
            }
            this.CommandReceived?.Invoke(this.CryptographyHandler.Undo(command));
        }
コード例 #2
0
 private void OnOutputLinkCommandReceived(string command)
 {
     this.device.Input(new byte[] { ByteFlag.PACKET_ACKNOWLEDGE });
     this.Output?.Invoke(Checksum.Encapsulate(this.CryptographyHandler.Undo(command)).ToArray());
 }
コード例 #3
0
ファイル: VirtualDevice.cs プロジェクト: ldcm3/PinPadEmulator
 public void Reply(string response)
 {
     this.Reply(Checksum.Encapsulate(this.CryptographyHandler.Redo(response)).ToArray());
 }