Пример #1
0
        private bool IsSupportedSignatureAlgorithm(string algorithm, object[] args, out SignatureProviderDescriptor descriptor)
        {
            if (args.Length > 0)
            {
                if (args[0] is SecurityKey key)
                {
                    if (args.Length == 2 && args[1] is bool willCreateSignature)
                    {
                        return(IsSupportedSignatureAlgorithm(algorithm, key, willCreateSignature, out descriptor));
                    }
                    return(IsSupportedSignatureAlgorithm(algorithm, key, null, out descriptor));
                }
            }

            descriptor = null;
            return(false);
        }
Пример #2
0
 private bool IsSupportedSignatureAlgorithm(string algorithm, SecurityKey key, bool?willCreateSignature, out SignatureProviderDescriptor descriptor)
 => _options.SupportedSignatureAlgorithms.TryGetValue(algorithm, out descriptor);