GetSerialNumberResponse Class
Namespace: Yubico.YubiThe response to the get serial number command, containing the YubiKey's serial number.
C#
public sealed class GetSerialNumberResponse : PivResponse, IYubiKeyResponseWithData<int>, IYubiKeyResponse
Remarks
This is the partner Response class to Get
The data returned is an int
.
Example:
IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
SerialCommand serialCommand = new GetSerialNumberCommand();
GetSerialNumberResponse serialResponse = connection.SendCommand(serialCommand);
if (serialResponse.Status == ResponseStatus.Success)
{
int serialNum = serialResponse.GetData();
}
Constructors
Name | Description |
---|---|
Get |
Constructs a GetSerialNumberResponse based on a ResponseApdu received from the YubiKey. |
Methods
Name | Description |
---|---|
Get |
Gets the serial number from the YubiKey response. |