MD5File

Cryptography

Description

Works out the MD5 digest of a file without loading it into memory first

The file opens with wide-path shared read access and streams through MD5Stream; when the file cannot be opened or the digest comes back short, the result falls back to the digest of the empty string

Syntax

Delphi

Function MD5File(Const FileName: WideString): MD5Digest;

Parameters

FileNameWide path of the file to hash

Return value

The 16-byte digest, or MD5String('') when the file cannot be read

Remarks

Treat the fallback result as a failure signal rather than a valid digest of content that is not there

See also

MD5Stream, MD5String, MD5Print, MD5Match