c#-无法覆盖Mono-2.10.8中的加密提供程序

我无法将我的加密提供者映射到machine.config文件中的名称.乍看之下,一切都井然有序,我是否忽略了一些愚蠢的事情?我正在使用Mono-2.10.8

<mscorlib>
    <cryptographySettings>
        <cryptoNameMapping>
            <cryptoClasses>
                <cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
                <cryptoClass AesProvider="MyProvider.MyAes, MswlAes, Culture='neutral', PublicKeyToken=0738eb9f132ed756, Version=1.0.0.0"/>
            </cryptoClasses>
            <nameEntry name="MD2" class="monoMD2" />
            <nameEntry name="AES" class="AesProvider"/>
            <nameEntry name="AES128" class="AesProvider"/>
            <nameEntry name="AES192" class="AesProvider"/>
            <nameEntry name="AES256" class="AesProvider"/>
            <nameEntry name="Rijndael" class="AesProvider"/>
            <nameEntry name="System.Security.Cryptography.Rijndael" class="AesProvider"/>
            <nameEntry name="System.Security.Cryptography.RijndaelManaged" class="AesProvider"/>
            <nameEntry name="System.Security.Cryptography.SymmetricAlgorithm" class="AesProvider"/>
        </cryptoNameMapping>
        <oidMap>
            <oidEntry OID="1.2.840.113549.2.2" name="MD2" />
            <oidEntry OID="1.2.840.113549.2.2" name="Mono.Security.Cryptography.MD2Managed" />
            <oidEntry OID="2.16.840.1.101.3.4.1.1" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.2" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.2" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.21" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.22" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.23" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.24" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.3" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.4" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.41" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.42" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.43" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1.44" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.1" name="AesProvider" />
            <oidEntry OID="2.16.840.1.101.3.4.4" name="AesProvider" />
        </oidMap>
    </cryptographySettings>
</mscorlib>

解决方法:

这个错误最近发生在fixed(非常),可以添加但不能替换新的算法/ oid.这将是将来的Mono 2.10.x版本的一部分.否则,您的machine.config看起来对我来说正确.

上一篇:linux-使用openssl作为命令行计算AES128 CMAC


下一篇:201871030121-马艳 实验三 结对项目—《D{0-1}KP 实例数据集算法实验平台》项目报告