fix sha1_hash function