GetData Method
GetData()
Gets the data from the YubiKey response.
C#
public int GetData()
Returns
System.Int32
An int, specifying the modality. The standard defines the meaning of each possible integer returned. Currently only one integer is defined: the value "1" means fingerprint.
Implements
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();
}