procedure CheckHash(const Content: TBytes); overload;

procedure CheckHash(Stream: TStream; Count: Int64 = 0); overload;

 

Description

The CheckHash method verifies the data integrity of the input data using the hash algorithm specified in the DigestAlgorithm property. The input data can be specified in the Content parameter as a byte array, or in the Stream parameter as a TStream object.

If the Stream parameter is used and the Count parameter is equal to 0, Stream.Position is set to 0 and the Stream.Size data count is used for computing the hash value.

If the Stream parameter is used and the Count parameter is more than 0, Stream.Position is not changed and the data count specified in the Count parameter is used for computing the hash value.

 

This method raises an exception if the verification of the data integrity fails.

 

Note: CheckHash does not authenticate the signer information because this method does not involve verifying a digital signature. For purpose checking of the integrity and authenticity of CMS/PKCS #7 message signer information, use the CheckSignature method.

 

See Also

CalcHash

DigestAlgorithm

SecureBridge Components, Copyright © 2007-2024 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support