Compute, and display, a HASH from a file.

Started by FrankB, Today at 05:53:39 AM

Previous topic - Next topic

FrankB

Hi Phil,

I have had a request to add a HASH function in ExifToolGUI:
https://github.com/FrankBijnen/ExifToolGui/issues/830

I think it is a valid request and could be useful. So I would like to add that in GUI. I looks like I can code computing a HASH (SHA-1, SHA-2, or MD5) quite easily in Delphi, no problems there. But I am wondering: Wouldn't it be a good addition for ExifTool to be able to compute a HASH of a file and display that as a 'pseudo'/'composite' tag?

Frank

greybeard

How about -ImageDataHash? Can be set to one of 'MD5', 'SHA256' or 'SHA512' Not quite the same thing but close.

FrankB

Thanks for your reply Greybeard.

I would have to ask the original requester of the issue, who is using it for 'digital forensics'. But my guess is that the HASH needs to be including the Metadata.


Phil Harvey

If he wants a hash of the whole file then it would be better to do this outside of ExifTool because the hash algorithms I've had to implement in Perl are very slow.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

FrankB

Thanks for your answer, Phil.

Will implement it in Delphi.

Frank

StarGeek

Here's a previous config file for getting an MD5 hash of a file as a tag. It requires having md5 on the system, which I don't think is default on Windows.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

FrankB

Quote from: StarGeek on Today at 09:46:08 AMwhich I don't think is default on Windows.

Correct. Not on mine at least.