Miserlou / omnihash

Hash files, strings, input streams and network resources in various common algorithms simultaneously
https://github.com/Miserlou/omnihash
MIT License
252 stars 23 forks source link

Hashing consecutive items with plugins is corrupted #20

Open ankostis opened 7 years ago

ankostis commented 7 years ago

Currently plugins install digester-instances when initialized. The SAME-DIGESTERSs are re-used multiple times, corrupting hashes for all but the 1st input!

But in reality, nobody could have discovered this because plugins simply DID NOT WORK :-)

These bug existed since plugins were originally introduced(#9) so the culprit falls completely on me! And it has not been discovered because TravisCI were not checking them.

To deal with these:

ankostis commented 7 years ago

See this build for the problem: [edit] https://travis-ci.org/ankostis/omnihash/builds/184589768

Also see this for why when trying to work across PY-versions is easier if not shadowing package-name with module, and using relative imports instead: https://travis-ci.org/ankostis/omnihash/jobs/184589769

Miserlou commented 7 years ago

Eagerly awaiting your PR..