Class GetApplicationVersionResponse
- Namespace
- Yubico.YubiKey.YubiHsmAuth.Commands
- Assembly
- Yubico.YubiKey.dll
The response to the GetApplicationVersionCommand command, containing the version of the YubiHSM Auth application as a major, minor, and patch value.
public class GetApplicationVersionResponse : BaseYubiHsmAuthResponse, IYubiKeyResponseWithData<ApplicationVersion>, IYubiKeyResponse
- Inheritance
-
objectGetApplicationVersionResponse
- Implements
- Inherited Members
Constructors
GetApplicationVersionResponse(ResponseApdu)
public GetApplicationVersionResponse(ResponseApdu responseApdu)
Parameters
responseApdu
ResponseApdu
Methods
GetData()
Gets the data from the YubiKey response.
public ApplicationVersion GetData()
Returns
- ApplicationVersion
The data returned by the YubiKey, presented in a manner specific to each implementation.
Remarks
If the method cannot return the data, it will throw an exception. This happens when the Status property indicates an error, or the data returned from the YubiKey was malformed or incomplete.
For example,
IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
GetDataCommand getDataCommand = new GetDataCommand(PivDataTag.Chuid);
GetDataResponse getDataResponse = connection.SendCommand(getDataCommand);
if (getDataResponse.Status == ResponseStatus.Success)
{
byte[] getChuid = getDataResponse.GetData();
}