This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.
Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.
Project: MD5 Message Digest Unit
Unit: PJMD5
Class: TPJMD5
Applies to: ~>1.0
property ReadBufferSize: Cardinal;
TPJMD5 buffers data read from streams and files. The size of the buffer is customisable. Read this property to find the buffer size in bytes. Set the property to change the buffer size.
The default buffer size is specified by the DefReadBufferSize class constant.
The following code reads data from a file in 1Kb chunks:
var
MD5: TPJMD5;
begin
MD5 := TPJMD5.Create;
try
MD5.ReadBufferSize := 1024;
MD5.ProcessFile('MyFile1.txt');
ShowMessage(MD5.Digest); // Digest implicitly cast to string
finally
MD5.Free;
end;
end;