Ejemplo n.º 1
0
        internal static void RegisterCipher(TlsCipherAlgorithm algo, Func<ICipher> factory)
        {
            if (!CipherAlgorithms.Add(algo))
            {
                throw new InvalidOperationException("Algorithm already registered");
            }

            CipherFactories.Add(algo, factory);
        }
Ejemplo n.º 2
0
 public static bool IsSupported(TlsCipherAlgorithm algo)
 {
     return CipherAlgorithms.Contains(algo);
 }
Ejemplo n.º 3
0
        internal static void RegisterSuite(CipherSuite suite, TlsCipherAlgorithm cipher, TlsHashAlgorithm digest, TlsSignatureAlgorithm signature, TlsKeyExchange exchange)
        {
            Suites.Add(suite);

            CipherMapping.Add(suite, cipher);
            DigestMapping.Add(suite, digest);
            SignatureMapping.Add(suite, signature);
            KeyExchangeMapping.Add(suite, exchange);
        }