Example #1
0
File: pbc.py Project: ace0/pyrelic
 def __eq__(self, other):
     """
     Compares two G1 elements. Also determines if the point is infinity
     (additive identity) when calling "self == 0".
     """
     return _equal(self, other, 0, librelic.g2_cmp_abi)
Example #2
0
File: pbc.py Project: ace0/pyrelic
 def __eq__(self, other):
     """
     Compares two Gt elements. Also determines if the point is the unity
     (multiplicative identity) element of Gt when calling "self == 1".
     """
     return _equal(self, other, 1, librelic.gt_cmp_abi)