Skip to content
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

sha1: Add collision resistent implementation #618

Merged
merged 1 commit into from Nov 29, 2022

Commits on Nov 25, 2022

  1. sha1: Add collision resistent implementation

    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:
    libgit2/libgit2@2dfd129
    git/git@28dc98e
    
    Signed-off-by: Paulo Gomes <pjbgf@linux.com>
    pjbgf committed Nov 25, 2022
    Copy the full SHA
    7c37589 View commit details
    Browse the repository at this point in the history