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

This reverts commit 37ea54c4cb45aa3836f2824e3afc4a51c173459c.