trying to figure out this SHA1 impelmentation