Skip to content

Conversation

@xizhao
Copy link
Contributor

@xizhao xizhao commented Jun 15, 2018

This PR fixes a bug that we have with our hash calculation.

Since we were using the same file stream to calculate the hash in serial, the reader was reaching the end of the file for subsequent hashes after sha1, resulting all other hashes to return the values of hashing empty data.

This solves this problem by paging the file into a multiplexer, which allows us to calculate all hashes simultaneously with one read.

@xizhao xizhao requested a review from elldritch June 15, 2018 02:07
@elldritch
Copy link
Contributor

LGTM.

@xizhao xizhao merged commit 9447e2d into master Jun 15, 2018
@xizhao xizhao deleted the fix/fix-hash-calculation branch June 15, 2018 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants