EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to extract digest hash value in SignedCMSMessage

Posted: 07/27/2011 04:25:07
by Gianni Di Pietrantonio (Standard support level)
Joined: 07/27/2011
Posts: 7

I'm evaluating SBB.

I have successufly signed a file in detached mode using TElSignedCMSMessage.
Now I have two file, the p7s file and the original file.

I would verify that the hash value of the original file (computed with TElHashFunction.Create(SB_ALGORITHM_DGST_SHA256,) is equal to the value stored in the p7s file.

The problem is that I am not able to retrieve the hash value of the original data that is stored in the p7s file. I have opened the p7s file with TElSignedCMSMessage.Open(Stream, nil), but I do not know how to find that value.

Can you send me sample code that explain how to extract that hash value from p7s file.

Best regards
Posted: 07/27/2011 04:33:10
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

You can read this value using TElSignedCMSMessage.Signatures[0].MessageDigest property.



Topic viewed 1249 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!