/// <summary>
 /// Initializes a new instance of the class <see cref="CryptographyManagerImpl"/> given a collection of <see cref="IHashProvider"/> and a
 /// collection of <see cref="ISymmetricCryptoProvider"/>.
 /// </summary>
 /// <param name="hashProviderNames">Sequence of names of the hash providers as defined in configuration.</param>
 /// <param name="hashProviders">The hash providers corresponding to the names in <paramref name="hashProviderNames"/> at the same index.</param>
 /// <param name="cryptoProviderNames">Sequence of names of the cryptography providers as defined in configuration.</param>
 /// <param name="symmetricCryptoProviders">The symmetric cryptography providers corresponding to the names give in <paramref name="cryptoProviderNames"/>
 /// <param name="instrumentationProvider">The instrumentation provider used to report errors.</param>
 /// at the same index.</param>
 public CryptographyManagerImpl(IEnumerable<string> hashProviderNames, IEnumerable<IHashProvider> hashProviders,
     IEnumerable<string> cryptoProviderNames, IEnumerable<ISymmetricCryptoProvider> symmetricCryptoProviders,
     IDefaultCryptographyInstrumentationProvider instrumentationProvider)
     : this(hashProviderNames.ToDictionary(hashProviders), cryptoProviderNames.ToDictionary(symmetricCryptoProviders), instrumentationProvider)
 {
     
 }
        /// <summary>
        /// Initializes a new instance of the class <see cref="CryptographyManagerImpl"/> giving a collection of <see cref="IHashProvider"/> and a collection of
        /// <see cref="ISymmetricCryptoProvider"/> and an <see cref="IDefaultCryptographyInstrumentationProvider"/>.
        /// </summary>
        /// <param name="hashProviders">Dictionary of named <see cref="IHashProvider"/> objects</param>
        /// <param name="symmetricCryptoProviders">Dictionary of named <see cref="ISymmetricCryptoProvider"/> objects.</param>
        /// <param name="instrumentationProvider">Instrumentation provider used to report configuration errors.</param>
        public CryptographyManagerImpl(
            IDictionary<string, IHashProvider> hashProviders, 
            IDictionary<string, ISymmetricCryptoProvider> symmetricCryptoProviders,
            IDefaultCryptographyInstrumentationProvider instrumentationProvider)
        {
            if (hashProviders == null)
                throw new ArgumentNullException("hashProviders");

            if (symmetricCryptoProviders == null)
                throw new ArgumentNullException("symmetricCryptoProviders");

            if(instrumentationProvider == null)
                throw new ArgumentNullException("instrumentationProvider");

            this.hashProviders = hashProviders;
            this.symmetricCryptoProviders = symmetricCryptoProviders;
            this.instrumentationProvider = instrumentationProvider;
        }
        /// <summary>
        /// Initializes a new instance of the class <see cref="CryptographyManagerImpl"/> giving a collection of <see cref="IHashProvider"/> and a collection of
        /// <see cref="ISymmetricCryptoProvider"/> and an <see cref="IDefaultCryptographyInstrumentationProvider"/>.
        /// </summary>
        /// <param name="hashProviders">Dictionary of named <see cref="IHashProvider"/> objects</param>
        /// <param name="symmetricCryptoProviders">Dictionary of named <see cref="ISymmetricCryptoProvider"/> objects.</param>
        /// <param name="instrumentationProvider">Instrumentation provider used to report configuration errors.</param>
        public CryptographyManagerImpl(
            IDictionary <string, IHashProvider> hashProviders,
            IDictionary <string, ISymmetricCryptoProvider> symmetricCryptoProviders,
            IDefaultCryptographyInstrumentationProvider instrumentationProvider)
        {
            if (hashProviders == null)
            {
                throw new ArgumentNullException("hashProviders");
            }

            if (symmetricCryptoProviders == null)
            {
                throw new ArgumentNullException("symmetricCryptoProviders");
            }

            if (instrumentationProvider == null)
            {
                throw new ArgumentNullException("instrumentationProvider");
            }

            this.hashProviders            = hashProviders;
            this.symmetricCryptoProviders = symmetricCryptoProviders;
            this.instrumentationProvider  = instrumentationProvider;
        }
 /// <summary>
 /// Initializes a new instance of the class <see cref="CryptographyManagerImpl"/> given a collection of <see cref="IHashProvider"/> and a
 /// collection of <see cref="ISymmetricCryptoProvider"/>.
 /// </summary>
 /// <param name="hashProviderNames">Sequence of names of the hash providers as defined in configuration.</param>
 /// <param name="hashProviders">The hash providers corresponding to the names in <paramref name="hashProviderNames"/> at the same index.</param>
 /// <param name="cryptoProviderNames">Sequence of names of the cryptography providers as defined in configuration.</param>
 /// <param name="symmetricCryptoProviders">The symmetric cryptography providers corresponding to the names give in <paramref name="cryptoProviderNames"/>
 /// <param name="instrumentationProvider">The instrumentation provider used to report errors.</param>
 /// at the same index.</param>
 public CryptographyManagerImpl(IEnumerable <string> hashProviderNames, IEnumerable <IHashProvider> hashProviders,
                                IEnumerable <string> cryptoProviderNames, IEnumerable <ISymmetricCryptoProvider> symmetricCryptoProviders,
                                IDefaultCryptographyInstrumentationProvider instrumentationProvider)
     : this(hashProviderNames.ToDictionary(hashProviders), cryptoProviderNames.ToDictionary(symmetricCryptoProviders), instrumentationProvider)
 {
 }