Revert "lib/sha1: use the git implementation of SHA-1"

This reverts commit 4256602c49011f7b50d33153eb01e1c84f326bd8.