<cryptoClass> Element

Contains a cryptography class that has a mapping to a friendly name in the <nameEntry> element.



<cryptoClass customClassName="fully qualified type name" />  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.


Attribute Description
customClassName Required attribute.

Contains the information for the cryptography class. Use this attribute to provide a short name for your class. You must specify a string that meets the requirements specified in Specifying Fully Qualified Type Names.

Child Elements


Parent Elements

Element Description
configuration The root element in every configuration file used by the common language runtime and .NET Framework applications.
cryptoClasses Contains a list of cryptography classes that have a mapping to a friendly name in the <nameEntry> element.
cryptographySettings Contains cryptography settings.
cryptoNameMapping Contains mappings of classes to friendly names.
mscorlib Contains the <cryptographySettings> element.


The following example shows how use the <cryptoClass> element to reference a cryptography class and to configure the runtime. You can then pass the string "RSA" to the System.Security.Cryptography.CryptoConfig.CreateFromName method and use the Create method to return a MyCryptoRSAClass object.

               <cryptoClass   MyCryptoRSA="MyCryptoRSAClass, MyAssembly  
                  Culture=neutral, PublicKeyToken=a5d015c7d5a0b012,  
            <nameEntry name="RSA" class="MyCryptoRSA"/>  
            <nameEntry name="System.Security.Cryptography.AsymmetricAlgorithm"  

See Also

Configuration File Schema
Cryptography Settings Schema
Cryptographic Services
Configuring Cryptography Classes