<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.16.0" />

Microsoft.IdentityModel.Tokens.CryptoProviderCache

public abstract class CryptoProviderCache
Abstract definition of a cache for cryptographic providers.
protected CryptoProviderCache()

protected abstract string GetCacheKey(SignatureProvider signatureProvider)

Returns the cache key used to look up an entry for a SignatureProvider.

protected abstract string GetCacheKey(SecurityKey securityKey, string algorithm, string typeofProvider)

Returns the cache key used to find a cryptographic provider in this cache.

public abstract bool TryAdd(SignatureProvider signatureProvider)

Tries to add a SignatureProvider to this cache.

public abstract bool TryGetSignatureProvider(SecurityKey securityKey, string algorithm, string typeofProvider, bool willCreateSignatures, out SignatureProvider signatureProvider)

Tries to find a SignatureProvider in this cache.

public abstract bool TryRemove(SignatureProvider signatureProvider)

Tries to remove a SignatureProvider from this cache.