ascmitc / mhl

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

Hasher Refactor #104

Closed jwaggs closed 2 years ago

jwaggs commented 2 years ago

Refactored the hasher to clean things up quite a bit. Removed a lot of redundant code. Abstracted common code between the "HexHashers" and the C4Hasher. Added hash tests.

jwaggs commented 2 years ago

I'm marking this as a draft until I clean up a few of the final tests and TODOs

jwaggs commented 2 years ago

Worth mentioning almost all changes worth reviewing are contained within the hasher.py module itself. The changes in other files are primarily just propagating some function name changes to where they were used, as well as regenerating the scenarios.

jwaggs commented 2 years ago

ready for review @ptrpfn - the hasher.py module and test_hasher.py are where 90% of the code change is. The rest of the file changes are mainly due to the propagation of name changes during the refactor.

jwaggs commented 2 years ago

@ptrpfn I'm fine with waiting til after meeting to merge.

BUT - I think this should be merged before a name change just to keep the PRs as contained as possible.

There was a lot of naming refactor already in this PR so I'd like to separate additional changes out even if they are quick.