Closed ste93cry closed 2 years ago
Hi, I've found this PR when looking for docs about the checksum
function to see if it supports multiple files and globs. It would be really nice to have this!
@hikerspath can you please review this?
@ste93cry Do you mind resolving the merge conflicts by pulling latest master into your working branch?
While we're at it, I was wondering if it makes sense to change the hashing algorithm to SHA256 like GitHub. WDYT?
@ste93cry I'll leave this entirely up to you. As it's just simple file hashes I don't see a problem sticking with md5, but I fully support either! Let me know if you want me to create a separate issue to change from md5 to sha2 or if you'd like to just implement the change to use sha2 with this PR.
Again, either way is fine by me and thanks for the good work :)
As it's just simple file hashes I don't see a problem sticking with md5
The main problem is that you may get the same hash for different files. More details can be found here
Let me know if you want me to create a separate issue to change from md5 to sha2 or if you'd like to just implement the change to use sha2 with this PR
Let's implement the changes here, they are minimal anyway so it won't take much more time to implement them
The main problem is that you may get the same hash for different files. More details can be found here
True, though random collisions are extremely rare though I can certainly see the rainbow-table, or similar, security concerns.
Let's implement the changes here, they are minimal anyway so it won't take much more time to implement them
Sounds great! Let me know if you want me to work on it, or if you'll be taking the charge on the code changes necessary for this change. In either case I'm happy to help!
@bdebyl changes are ready, do you mind reviewing them?
@ste93cry sorry for getting back to you so late, it looks good to me pending one more engineering team member review and then we can merge and stage it for v1.4.0!
Fixes #196
Proposed Changes
hashFiles
template functionDescription
The
checksum
template function is able to compute the MD5 hash of just one file per time. Instead, similarly to what can be done in the GitHub Actions, it is sometimes useful to be able to get the hash of a series of files. In addition to this, it is also sometimes useful to be able to get the list of files according to a glob pattern. To avoid breaking changes and to also make it clearer that the function can work with a list of files, I've added a newhashFiles
function.Checklist
Unreleased
section of CHANGELOG.