function CalcHash(const Content: TBytes): TBytes; overload;

function CalcHash(Stream: TStream; Count: Int64 = 0): TBytes; overload;

 

Description

The CalcHash method computes the hash value for 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.

 

See Also

CheckHash

DigestAlgorithm

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