aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/hash/hash.go
Commit message (Collapse)AuthorAgeFilesLines
* *: fix some typosZhizhen He2023-09-081-1/+1
| | | | Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
* plumbing/hash: Add SHA256 as a supported algorithmPaulo Gomes2023-03-071-0/+3
| | | | | | Relates to #706. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* Remove need to build with CGOPaulo Gomes2023-02-251-4/+2
| | | | | | | | | | | | Follow-up from #618, at the time the Pure Go sha1cd implementation was not performant enough to be the default. This has now changed and the cgo and generic implementations yields similar results. Users are able to override the default implementation, however this seems to be a better default as it does not require the use of CGO during build time. Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* sha1: Add collision resistent implementationPaulo Gomes2022-11-251-0/+59
Implement the same SHA1 collision resistent algorithm used by both the Git CLI and libgit2. Only commits with input that match the unavoidable bit conditions will be further processed, which will result in different hashes. Which is the same behaviour experienced in the Git CLI and Libgit2. Users can override the hash algorithm used with: hash.RegisterHash(crypto.SHA1, sha1.New) xref links: https://github.com/libgit2/libgit2/pull/4136/commits/2dfd1294f7a694bfa9e864a9489ae3cb318a5ed0 https://github.com/git/git/commit/28dc98e343ca4eb370a29ceec4c19beac9b5c01e Signed-off-by: Paulo Gomes <pjbgf@linux.com>