public async Task <KeyResponse <string> > GetVersionAsync( CancellationToken cancellationToken = new CancellationToken()) { var message = ApduMessageCodec.EncodeVersionRequest(); var response = await QueryApduAsync(message, cancellationToken); return(ApduMessageCodec.DecodeVersionResponse(response)); }
public async Task <KeyResponse <KeyRegisterResponse> > RegisterAsync(KeyRegisterRequest request, CancellationToken cancellationToken = new CancellationToken(), bool invididualAttestation = false) { var flags = invididualAttestation ? EnforceUserPresenceAndSign | InteractionFlags.AttestWithDeviceKey : EnforceUserPresenceAndSign; var message = ApduMessageCodec.EncodeRegisterRequest(new KeyRequest <KeyRegisterRequest>(request, flags)); var response = await QueryApduAsync(message, cancellationToken); return(ApduMessageCodec.DecodeRegisterReponse(response)); }
public async Task <KeyResponse <KeySignResponse> > SignAsync(KeySignRequest request, CancellationToken cancellationToken = new CancellationToken(), bool noWink = false) { var flags = noWink ? EnforceUserPresenceAndSign | InteractionFlags.TestSignatureOnly : EnforceUserPresenceAndSign; var message = ApduMessageCodec.EncodeAuthenticateRequest( new KeyRequest <KeySignRequest>(request, flags)); var response = await QueryApduAsync(message, cancellationToken); return(ApduMessageCodec.DecodeAuthenticateReponse(response)); }