<oidEntry> 元素

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

<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 对象标识符以某些加密格式标识算法。 将对象标识符映射到要标识的算法的友好名称。 有关对象标识符的更多信息,请参见 MSDN Library。

示例

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

请参见

参考

密码设置架构

概念

加密服务

将对象标识符映射到加密算法

其他资源

.NET Framework 的配置文件架构

配置加密类