Example #1
0
        private bool IsSupportedSymmetricAlgorithm(string algorithm, object[] args, out SymmetricAlgorithmDescriptor descriptor)
        {
            if (args.Length == 0)
            {
                return(IsSupportedSymmetricAlgorithm(algorithm, null as SecurityKey, out descriptor));
            }
            if (args.Length == 1 && args[0] is SecurityKey key)
            {
                return(IsSupportedSymmetricAlgorithm(algorithm, key, out descriptor));
            }

            descriptor = null;
            return(false);
        }
Example #2
0
 private bool IsSupportedSymmetricAlgorithm(string algorithm, SecurityKey key, out SymmetricAlgorithmDescriptor descriptor)
 => _options.SupportedSymmetricAlgorithms.TryGetValue(algorithm, out descriptor);