How to build a pkc7 CMS from a hash?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to build a pkc7 CMS from a hash?

Mickaël Guerin
Hi,

I need to compute un-encapsulated pkcs7 signature from content, or directly from their hash (sha256), depending of use cases.

With the content, I create a CMSSignedData with provider "SHA256withRSA".
No problem to encrypt and verify.

But I can't achieve to compute the same CMS using the hash as input.
I tried to use a custom ContentSigner, to bypass the sha256, without success.

Do you have any tips?
Thanks