def _const_compare_digest_backport(a, b):
result = abs(len(a) - len(b))<EOL>for l, r in zip(bytearray(a), bytearray(b)):<EOL><INDENT>result |= l ^ r<EOL><DEDENT>return result == <NUM_LIT:0><EOL>
Compare two digests of equal length in constant time.

The digests must be of type str/bytes.
Returns True if the digests match, and False otherwise.