Class GetSerialNumberResponse
The response to the GetSerialNumberCommand command, containing the YubiKey's serial number.
public class GetSerialNumberResponse : OtpResponse, IYubiKeyResponseWithData<int>, IYubiKeyResponse
- Inheritance
-
objectGetSerialNumberResponse
- Implements
- Inherited Members
Constructors
GetSerialNumberResponse(ResponseApdu)
Constructs a GetSerialNumberResponse based on a ResponseApdu received from the YubiKey.
public GetSerialNumberResponse(ResponseApdu responseApdu)
Parameters
responseApdu
ResponseApduThe object containing the response APDU returned by the YubiKey.
Methods
GetData()
Gets the serial number.
public int GetData()
Returns
- int
The data in the ResponseAPDU, presented as an int.
Exceptions
- InvalidOperationException
- MalformedYubiKeyResponseException
Thrown when the data received from the YubiKey does not match the expectations of the parser.