Do not use memcmp(sha1_1, sha1_2, 20) with hardcoded length.