Can RSACryptoServiceProvider (.NET's RSA) use SHA256 for encryption (not signing) instead of SHA1?

前端 未结 6 1570
渐次进展
渐次进展 2020-12-15 08:11

When encrypting, can RSACryptoServiceProvider (or any other RSA encryptor available from .NET) use SHA256 instead of SHA1?

SHA1 appears to be hard coded with no way

6条回答
  •  死守一世寂寞
    2020-12-15 08:52

    Bounty Castle C# was updated to 1.7 after this question was asked and answered. For future reference you might consider it, it adds supports a lot of crypto algorithms, hashes, signatures that Bouncy Castle makes available for Java. Hit the link, look for 'Release Notes for 1.7' and 'Current feature list:'.

提交回复
热议问题