/// <summary>
        /// Initializes a new instance of the <see cref="KeyRotationOptions"/> class.
        /// </summary>
        /// <param name="other">The other.</param>
        internal KeyRotationOptions(KeyRotationOptions other)
        {
            if (other == null)
            {
                return;
            }

            KeyPropagationWindow = other.KeyPropagationWindow;
            MaxServerClockSkew   = other.MaxServerClockSkew;
            KeyRingRefreshPeriod = other.KeyRingRefreshPeriod;
            AutoGenerateKeys     = other.AutoGenerateKeys;
            NewKeyLifetime       = other.NewKeyLifetime;
            XmlEncryptor         = other.XmlEncryptor;
            XmlRepository        = other.XmlRepository;
            AuthenticatedEncryptorConfiguration = other.AuthenticatedEncryptorConfiguration;

            foreach (var keyEscrowSink in other.KeyEscrowSinks)
            {
                KeyEscrowSinks.Add(keyEscrowSink);
            }

            foreach (var encryptorFactory in other.AuthenticatedEncryptorFactories)
            {
                AuthenticatedEncryptorFactories.Add(encryptorFactory);
            }
        }
Example #2
0
        // copy ctor
        internal KeyManagementOptions(KeyManagementOptions other)
        {
            if (other != null)
            {
                AutoGenerateKeys = other.AutoGenerateKeys;
                _newKeyLifetime  = other._newKeyLifetime;
                XmlEncryptor     = other.XmlEncryptor;
                XmlRepository    = other.XmlRepository;
                AuthenticatedEncryptorConfiguration = other.AuthenticatedEncryptorConfiguration;

                foreach (var keyEscrowSink in other.KeyEscrowSinks)
                {
                    KeyEscrowSinks.Add(keyEscrowSink);
                }

                foreach (var encryptorFactory in other.AuthenticatedEncryptorFactories)
                {
                    AuthenticatedEncryptorFactories.Add(encryptorFactory);
                }
            }
        }