VerifySignature Method
VerifySignature(ReadOnlyMemory<Byte>, ReadOnlyMemory<Byte>, ReadOnlyMemory<Byte>)
Use the given public key to verify the signature. Use the given Application ID (hash of origin data) and Client Data Hash (includes the challenge) to build the data to verify.
public bool VerifySignature(ReadOnlyMemory<byte> userPublicKey, ReadOnlyMemory<byte> applicationId, ReadOnlyMemory<byte> clientDataHash)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | userPublicKey | The public key partner to the private key used to authenticate this credential, as an encoded EC Point. |
System.ReadOnlyMemory<System.Byte> | applicationId | The original |
System.ReadOnlyMemory<System.Byte> | clientDataHash | The original |
Returns
A bool
, true
if the signature verifies, false
otherwise.
Remarks
This will build the data to verify from the input
applicationId
, clientDataHash
, along with the user
presence and counter data inside this object. The user presence and
counter were part of the authentication response, the encodedResponse
of the constructor. It will then verify the signature inside this
object (from the encoded response) using the public key.
The public key is returned by the YubiKey during registration. See the RegistrationData class.