@classmethod
def compare(cls, lhs, rhs, std_len):
    """Return 'lhs == rhs' in constant time"""
    l = cls._encoded(lhs)
    r = cls._encoded(rhs)
    len_l = len(l)
    len_r = len(r)
    if len_l != len_r:
        s = l if len_l != std_len else r
        l, r = s, s
    result = cls._fixed_time_compare(l, r)
    return result if len_l == len_r else False
