libs.nfc/NFC/APDUResponse.cs

25 lines
586 B
C#
Raw Permalink Normal View History

2023-01-29 18:43:53 +01:00
using System;
namespace NFC
2021-03-30 22:51:02 +02:00
{
public class APDUResponse
{
2021-03-30 23:27:12 +02:00
public byte SW1 { get; set; }
public byte SW2 { get; set; }
public byte[] Body { get; set; }
2023-01-29 18:43:53 +01:00
public override string ToString()
{
if(Body != null)
{
return string.Format("SW: {0:x} {1:x} Body: {2:x}", SW1, SW2, BitConverter.ToString(Body).Replace("-", "").ToLower());
}
else
{
return string.Format("SW: {0:x} {1:x} Body: null", SW1, SW2);
}
}
2021-03-30 22:51:02 +02:00
}
}