SignedPkcs7TCheckHash Method

Verifies the data integrity of the CMS/PKCS #7 message. This is a specialized method used in specific security infrastructure applications that only wish to check the hash of the CMS message, rather than perform a full digital signature verification.

Definition

Namespace: SysadminsLV.PKI.Cryptography.Pkcs
Assembly: SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 4.0.1
C#
public bool CheckHash(
	bool checkAll
)

Parameters

checkAll  Boolean
Specifies if all hashes are checked when multiple signatures are used. This parameter has no meaning when only one signature is attached.

Return Value

Boolean
True if hash stored in signer information matches content hash, otherwise False.

Remarks

When message is signed with single signer, its hash is compared with actual hash of the message.

When message is signed by multiple signers and checkAll is set to false, then method returns True if hash check passed for at least one signer.

When message is signed by multiple signers and checkAll is set to true, then method returns True if hash check passed for all signers. If hash check fails for at least one signer, or any signer has absent hash value to compare with, the method will return false.

See Also