GetData Method
GetData()
Gets the public key from the YubiKey response.
C#
public PivPublicKey GetData()
Returns
The public key as a PivPublicKey (or subclass: PivRsaPublicKey or PivEccPublicKey) object.
Implements
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException |
Remarks
Note that if there is no data to return, this method will throw an
exception. Even if the response indicates
AuthenticationRequired
(see the Status
property), which
means the process was not completed because the wrong or no PIN was
entered, or the YubiKey was not touched within the time period. That
is, it is not an error, the process is simply incomplete.
Nonetheless, in that case the method will throw an exception. Hence,
do not call this method unless you know that Status
is
Success
.