ascmitc / mhl

ASC Media Hash List
MIT License
58 stars 8 forks source link

HashFormatType of 'failed' is ignored #115

Open jmccdev opened 2 years ago

jmccdev commented 2 years ago

I created an ASC MHL History using the command line tool:

ascmhl create -h md5 16421225_Day001/

Afterwards, I manually changed the HashFormatType to 'failed' for first hash: <md5 action="original" hashdate="2022-02-08T14:54:36.763024-08:00">9290a2ca3f586cb53da7cb516610fed2</md5>

<md5 action="failed" hashdate="2022-02-08T14:54:36.763024-08:00">9290a2ca3f586cb53da7cb516610fed2</md5>

I then ran the create command on the same directory. There was no error about the 'failed' HashFormatType. In the new 0002* MHL, the hash register for that file was kept, and the HashFormatType was changed to 'original':

$ grep 9290a2ca3f586cb53da7cb516610fed2 16421225_Day001/ascmhl/0002_16421225_Day001_2022-02-15_010424.mhl 
      <md5 action="original" hashdate="2022-02-14T17:04:24.138918-08:00">9290a2ca3f586cb53da7cb516610fed2</md5>

Even though the md5 hash did not change and was technically accurate for the respective file, I expected this hash to be removed for the new MHL generation, due to the 'failed' HashFormatType.

The data used for this is under /sources/104_verification_types/104f/ within the dataset on the G-Drive: https://drive.google.com/drive/folders/1PrAPczRFBQsVfjakbX-fqnDVHsAD-kd1

jmccdev commented 2 years ago

Possibly the spec does not allow for a 1st generation MHL to contain a 'failed' HashFormatType.