public override HashAlgorithm CreateHashAlgorithm(string algorithm) { if (CustomCryptoProvider != null && CustomCryptoProvider.IsSupportedAlgorithm(algorithm)) { return(CustomCryptoProvider.Create(algorithm) as HashAlgorithm); } return(HashAlgorithm); }
public override SignatureProvider CreateForVerifying(SecurityKey key, string algorithm) { CreateForVerifyingCalled = true; if (CustomCryptoProvider != null && CustomCryptoProvider.IsSupportedAlgorithm(algorithm, key)) { return(CustomCryptoProvider.Create(algorithm, key) as SignatureProvider); } if (VerifyingSignatureProvider != null && CacheSignatureProviders) { CryptoProviderCache.TryAdd(VerifyingSignatureProvider); } return(VerifyingSignatureProvider); }