Declaration
TIEHashStream = class(TStream)
Description
Builds a hash string from a stream using a standard algorithm: MD2, MD4, MD5, SHA1, SHA2, SHA384 or SHA512.
// Save image with a unique name (by creating a hash from the jpeg content and using it as the filename)
var
hashStream: TIEHashStream;
begin
hashStream := TIEHashStream.Create(iehaMD5);
try
ImageEnView1.IO.SaveToStreamJpeg(hashStream);
hashStream.SaveToFile(hashStream.GetHash()+'.jpg');
finally
hashStream.Free;
end;
end;