private static void logResponse(byte[] addu, APDUresponse res) { /* * logger.Debug(string.Format($"SendAPDU={CTAP2.Common.BytesToHexString(addu)}")); * logger.Debug(string.Format($"IsSuccess={res.IsSuccess}")); * logger.Debug(string.Format($"Message={res.Message}")); * logger.Debug(string.Format($"SW1=0x{res.Sw1:X2},SW2=0x{res.Sw2:X2}")); * logger.Debug(string.Format($"Data={CTAP2.Common.BytesToHexString(res.Data)}")); */ }
public void Marge(APDUresponse add) { if (add.Data != null) { this.Data = Data.Concat(add.Data).ToArray(); } this.Sw1 = add.Sw1; this.Sw2 = add.Sw2; this.IsSuccess = add.IsSuccess; this.Message = add.Message; }
internal APDUresponse SendandResponse(byte[] apdu) { APDUresponse res = null; try { int recvSize = SCardAPI.SCardTransmit(this.handle, apdu, this.recvBuff); res = new APDUresponse(recvBuff, recvSize); } catch (Exception) { } finally { logResponse(apdu, res); } return(res); }