<oidEntry> 元素

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

configuration
  <mscorlib>
    <cryptographySettings>
      <oidMap>
       <oidEntry>

语法

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

特性和元素

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

特性

属性 说明
OID 必需的特性。

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

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

子元素

无。

父元素

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

备注

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

示例

下面的示例演示如何使用 <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>  

请参阅