def _const_compare_digest_backport(a, b):
 result = abs((len(a) - len(b)))
 for (l, r) in zip(bytearray(a), bytearray(b)):
  result |= (l ^ r)
 return (result == 0)

def _const_compare_digest_backport ( a , b ) : result = abs ( ( len ( a ) - len ( b ) ) ) for ( l , r ) in zip ( bytearray ( a ) , bytearray ( b ) ) : result |= ( l ^ r ) return ( result == 0 )
compare two digests of equal length in constant time .