Partager via


InMemoryCryptoProviderCache.TryGetSignatureProvider Method

Definition

Trys to find a SignatureProvider to this cache.

public override bool TryGetSignatureProvider (Microsoft.IdentityModel.Tokens.SecurityKey securityKey, string algorithm, string typeofProvider, bool willCreateSignatures, out Microsoft.IdentityModel.Tokens.SignatureProvider signatureProvider);
override this.TryGetSignatureProvider : Microsoft.IdentityModel.Tokens.SecurityKey * string * string * bool * SignatureProvider -> bool
Public Overrides Function TryGetSignatureProvider (securityKey As SecurityKey, algorithm As String, typeofProvider As String, willCreateSignatures As Boolean, ByRef signatureProvider As SignatureProvider) As Boolean

Parameters

securityKey
SecurityKey

the key that is used to by the crypto provider.

algorithm
String

the algorithm that is used by the crypto provider.

typeofProvider
String

the typeof the crypto provider obtained by calling object.GetType().

willCreateSignatures
Boolean

If true, the provider will be used for creating signatures.

signatureProvider
SignatureProvider

the SignatureProvider if found.

Returns

true if a SignatureProvider was found, false otherwise.

Exceptions

if typeofProvider is null or empty string.

Applies to