Table of Contents

Class CSPKeyProvider

Namespace
The.Security.PKI
Assembly
Instagile.dll

uses a windows CSP 'smart card' to store keypairs and provide cryptographic operations

public class CSPKeyProvider : IAnonymousKeyProvider, IKeyProvider
Inheritance
CSPKeyProvider
Implements
Inherited Members

Remarks

developed/tested with the Feitian ePass2003 for now (very similar to the Fortinet FT300)

Properties

UsePrivateCSP

Use the Feitian driver instead of the Microsoft base provider with vendor minidriver

public bool UsePrivateCSP { get; set; }

Property Value

bool

Methods

CreateDefaultPrivateKey(string)

public AuthenticationResult<RSACryptoServiceProvider> CreateDefaultPrivateKey(string keyPassword)

Parameters

keyPassword string

Returns

AuthenticationResult<RSACryptoServiceProvider>

CreateDefaultPrivateKeyAsync(string, CancellationToken)

public Task<AuthenticationResult<RSACryptoServiceProvider>> CreateDefaultPrivateKeyAsync(string keyPassword, CancellationToken cancellationToken)

Parameters

keyPassword string
cancellationToken CancellationToken

Returns

Task<AuthenticationResult<RSACryptoServiceProvider>>

CreateDefaultPublicKey(bool)

public AuthenticationResult<RSACryptoServiceProvider> CreateDefaultPublicKey(bool interactive)

Parameters

interactive bool

Returns

AuthenticationResult<RSACryptoServiceProvider>

CreateDefaultPublicKeyAsync(bool, CancellationToken)

public Task<AuthenticationResult<RSACryptoServiceProvider>> CreateDefaultPublicKeyAsync(bool interactive, CancellationToken cancellationToken)

Parameters

interactive bool
cancellationToken CancellationToken

Returns

Task<AuthenticationResult<RSACryptoServiceProvider>>

CreateNamedKeyAsync(IEntityContext, string, CancellationToken)

load a public key for verification only

public Task<AuthenticationResult<RSA>> CreateNamedKeyAsync(IEntityContext context, string keyName, CancellationToken cancellationToken)

Parameters

context IEntityContext
keyName string
cancellationToken CancellationToken

Returns

Task<AuthenticationResult<RSA>>