internal static void RegisterKeyExchange(TlsKeyExchange algo, Func<ITlsKeyExchange> factory) { if (!KeyExchanges.Add(algo)) { throw new InvalidOperationException("Algorithm already registered"); } KeyExchangeFactories.Add(algo, factory); }
public static bool IsSupported(TlsKeyExchange algo) { return KeyExchanges.Contains(algo); }
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); }