Reputation: 27683
Since RSACryptoServiceProvider.VerifyHash verifies an already hashed message - why does it need to know which hash algorithm was used?
When asking about the SignHash
method , it was suggested that the reason there is for communicating the hash (and not for actual use in the signing). But that won't explain it in this case. (since it's not an out
parameter.)
Upvotes: 2
Views: 1311
Reputation: 14160
That's because PKCS#1 encoding of signature includes hash function OID in RSA-encrypted data block.
Upvotes: 3