<nameEntry> Element 

Maps a class name to a friendly algorithm name, which allows one class to have many friendly names.

<nameEntry name="friendly name" Class="class name" />

Attributes and Elements

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


Attribute Description


Required attribute.

Specifies the friendly name of the algorithm that the cryptography class implements.


Required attribute.

Specifies the value for the name attribute in the <cryptoClass> element.

Child Elements


Parent Elements

Element Description


The root element in every configuration file used by the common language runtime and .NET Framework applications.


Specifies the root element for the ASP.NET configuration section.


The name attribute can be the name of one of the abstract classes found in the System.Security.Cryptography namespace. When you call the Create method on an abstract cryptography class, the abstract class name is passed to the Security.CryptoConfig.CreateFromName method. CreateFromName returns an instance of the type indicated by the class attribute. If the name attribute is a short name, such as RSA, you can use that name when calling the CreateFromName method.


The following example shows how to use the <nameEntry> element to map a cryptography class to friendly algorithm name. This example configures the runtime so that System.Security.CryptoConfig.CreateFromName("RSA") and System.Security.Cryptography.AsymmetricAlgorithm.Create in an application returns a MyCryptoRSAClass object.

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

See Also


Cryptography Settings Schema

Other Resources

Configuration File Schema for the .NET Framework
Cryptographic Services
Configuring Cryptography Classes