simplify SHA1 code