I need to add a IPTC digest to a file. I tried copying it from another file but that does not work.
How do I add that tag to a jpg file?
From the notes under the IPTCDigest tag on the Photoshop tags page (https://exiftool.org/TagNames/Photoshop.html):
Set this to "new" as an indication that the XMP is synchronized with the IPTC
exiftool -IPTCDigest=new /path/to/files/
Take note that exiftool doesn't do any checking to see if the IPTC and XMP data are properly synced. It is up to you to make sure this is the case. If they are not synced, then any program that respects the IPTCDigest will discard any matching XMP data.