开发者

How to use Bouncy Castle to remove a signature from a CMS?

开发者 https://www.devze.com 2022-12-28 14:26 出处:网络
I have a signedCMS, and would like to know how to use Bouncy Castle API to remove the signature so I can have clear access to the plain text file 开发者_Go百科underneath?

I have a signedCMS, and would like to know how to use Bouncy Castle API to remove the signature so I can have clear access to the plain text file 开发者_Go百科underneath?

Thanks


Something like this might work:

CMSSignedData signedData = new CMSSignedData(signedFileBytes);

// Now get the content contained in the CMS EncapsulatedContentInfo
CMSProcessable processable = signedData.getSignedContent();    

You should then be able to get a stream on processable from which the data can be read.

0

精彩评论

暂无评论...
验证码 换一张
取 消