-
-
Notifications
You must be signed in to change notification settings - Fork 342
feat: implement Hash and HashSums to performing hashing based on user provided hashers
#215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bitfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Could you also please deprecate SHA256Sum(s) in favour of the new methods?
Signed-off-by: Mahad Zaryab <[email protected]>
bitfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
bitfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Just a couple of tweaks needed.
script.go
Outdated
|
|
||
| // SHA256Sum returns the hex-encoded SHA-256 hash of the entire contents of the | ||
| // pipe, or an error. | ||
| // Deprecated: SHA256Sum has been deprecated by [Pipe.Hash]. To get the SHA 256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Deprecated: SHA256Sum has been deprecated by [Pipe.Hash]. To get the SHA 256 | |
| // Deprecated: SHA256Sum has been deprecated by [Pipe.Hash]. To get the SHA-256 |
script.go
Outdated
| // SHA256Sums reads paths from the pipe, one per line, and produces the | ||
| // hex-encoded SHA-256 hash of each corresponding file, one per line. Any files | ||
| // that cannot be opened or read will be ignored. | ||
| // Deprecated: SHA256Sums has been deprecated by [Pipe.HashSums]. To get the SHA 256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Deprecated: SHA256Sums has been deprecated by [Pipe.HashSums]. To get the SHA 256 | |
| // Deprecated: SHA256Sums has been deprecated by [Pipe.HashSums]. To get the SHA-256 |
script.go
Outdated
| // hex-encoded SHA-256 hash of each corresponding file, one per line. Any files | ||
| // that cannot be opened or read will be ignored. | ||
| // Deprecated: SHA256Sums has been deprecated by [Pipe.HashSums]. To get the SHA 256 | ||
| // encoding for the paths in the pipe, call `HashSums(sha256.new())` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // encoding for the paths in the pipe, call `HashSums(sha256.new())` | |
| // hash for each file path in the pipe, call `HashSums(sha256.new())` |
bitfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! Thanks again.
Hashsink that returns the hex encoded hash of the pipe contents based on thehash.Hashargument passed into the methodHashSumsfilter that produces the hex encoded hash of the files in the pathThis PR resolves #113, #130.