Esempio n. 1
0
        private HashAlgorithmProviderData GetHashAlgorithmProviderDataFromCursor()
        {
            HashProviderData hashProviderData = cryptoConfigurationView.GetHashProviderData(ConfigurationName);

            ArgumentValidation.CheckExpectedType(hashProviderData, typeof(HashAlgorithmProviderData));
            return((HashAlgorithmProviderData)hashProviderData);
        }
Esempio n. 2
0
        /// <summary>
        /// <para>Gets the <see cref="Type"/> of the <see cref="IHashProvider"/> to create based on the name.</para>
        /// </summary>
        /// <param name="hashProviderName">
        /// <para>The name of the configuration object to create.</para>
        /// </param>
        /// <returns>
        /// <para>The <see cref="Type"/> of <see cref="IHashProvider"/> to create.</para>
        /// </returns>
        protected override Type GetConfigurationType(string hashProviderName)
        {
            CryptographyConfigurationView cryptoConfigurationView = (CryptographyConfigurationView)CreateConfigurationView();
            HashProviderData hashProviderData = cryptoConfigurationView.GetHashProviderData(hashProviderName);

            return(GetType(hashProviderData.TypeName));
        }