Export (0) Print
Expand All

<cryptoClasses> Element

Contains a list of cryptography classes that have a mapping to a friendly name in the <nameEntry> element.

<configuration>
   <mscorlib>
      <cryptographySettings>
         <cryptoNameMapping>
            <cryptoClasses>

<cryptoClasses>
</cryptoClasses>

Child Elements

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

Example

The following example shows how to use the <cryptoClasses> element to contain a reference to a cryptography class and configure the runtime so that System.Security.CryptoConfig.CreateFromName("RSA") and System.Security.Cryptography.AsymmetricAlgorithm.Create return a MyCryptoRSAClass object.

<configuration>
   <mscorlib>
      <cryptographySettings>
         <cryptoNameMapping>
            <cryptoClasses>
               <cryptoClass   MyCryptoRSA="MyCryptoRSAClass, MyAssembly
                  Culture=neutral, PublicKeyToken=a5d015c7d5a0b012,
                  Version=1.0.0.0"/>
               <!-- Other cryptography classes go here. -->
            </cryptoClasses>
            <nameEntry name="RSA" class="MyCryptoRSA"/>
            <nameEntry name="System.Security.Cryptography.AsymmetricAlgorithm"
                       class="MyCryptoRSA"/>
             <!-- Mappings to other cryptography classes go here. -->
         </cryptoNameMapping>
      </cryptographySettings>
   </mscorlib>
</configuration>

Configuration File

This element can be used in the machine configuration file (Machine.config).

See Also

Configuration File Schema | Cryptography Settings Schema | Cryptographic Services | System.Security.Cryptography.CryptoConfig.CreateFromName | System.Security.Cryptography | Configuring Cryptography Classes

Show:
© 2014 Microsoft