3

特に Windows 2012 R2 で問題に直面しています。

以下はデモコードです。

rsa.ImportParameters(new RSAParameters
                         {
                             Exponent = new byte[] { 1, 0, 1 },
                             Modulus = OurModulus
                         });

次のような例外をスローします。

Exception Source : mscorlib

Exception Type : CryptographicException

Exception Message : The parameter is incorrect.

Exception Stacktrace :

at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)

at System.Security.Cryptography.Utils._ImportKey(SafeProvHandle hCSP, Int32 keyNumber, CspProviderFlags flags, Object cspObject, SafeKeyHandle& hKey)

at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters)

このスニペットは、Windows 7、Windows 8、Windows 10 では正常に動作しますが、Windows 2012 R2 では失敗します。

どんな助けもかなりのものです。

4

0 に答える 0