rename variables HEX_LEN=>SHA1_HEX_LENGTH and SHA_DIGEST_LENGTH=>SHA1_BIN_LENGTH
fix two minor typos