<oidEntry> 元素

将 ASN.1 对象标识符(OID)映射到友好名称。

<配置>
   <mscorlib>
     <cryptographySettings>
       <oidMap>
        <oidEntry>

Syntax

<oidEntry OID="object identifier number" name="friendly name" />

特性和元素

下列各节描述了特性、子元素和父元素。

特性

Attribute Description
OID 必需属性。

指定与类实现的算法对应的 ASN.1 OID。
name 必需属性。

指定 nameEntry> 标记中<属性的值name

子元素

没有。

父元素

元素 Description
configuration 公共语言运行时和 .NET Framework 应用程序所使用的每个配置文件中的根元素。
cryptographySettings 包含加密设置。
mscorlib 包含 cryptographySettings 元素。
oidMap 包含 ASN.1 对象标识符(OID)映射到类。

注解

ASN.1 对象标识符以某种加密格式标识算法。 将对象标识符映射到要标识的算法的友好名称。

Example

以下示例演示如何使用 <oidEntry> 元素将 RIPEMD-160 哈希算法的对象标识符映射到该哈希算法的实现。

<configuration>
   <mscorlib>
      <cryptographySettings>
         <cryptoNameMapping>
            <cryptoClasses>
               <cryptoClass   MyCrypto="MyCryptoClass, MyAssembly
                  Culture=neutral, PublicKeyToken=a5d015c7d5a0b012,
                  Version=1.0.0.0"/>
            </cryptoClasses>
            <nameEntry name="RIPEMD-160" class="MyCrypto"/>
         </cryptoNameMapping>
         <oidMap>
            <oidEntry OID="1.3.36.3.2.1"   name="MyCryptoClass"/>
         </oidMap>
      </cryptographySettings>
   </mscorlib>
</configuration>

另请参阅