fix sha1 length bug