bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

CMS signing with pre-calculated hash

Open drauch opened this issue 4 years ago • 4 comments

Hi!

We want to create a SignedCms (detached mode) for content of which we only have the hash available. Is it possible to instruct BouncyCastle (when generating the signature for the CMS) that it does not have to hash the provided content anymore, as the provided content already is the hash?

Best regards, D.R.

drauch avatar Dec 02 '21 15:12 drauch

It looks like CMSSignedDataGenerator.Generate() clears the _digests member beforehand. Is there a workaround?

drauch avatar Dec 02 '21 16:12 drauch