mirror of https://github.com/nucypher/pyUmbral.git
Implement __sub__ on Point
parent
f076da6518
commit
337a78851b
|
@ -108,6 +108,12 @@ class Point(object):
|
|||
|
||||
return Point(sum, self.curve_nid, self.group)
|
||||
|
||||
def __sub__(self, other):
|
||||
"""
|
||||
Performs subtraction by adding the inverse of the `other` to the point.
|
||||
"""
|
||||
return (self + (~other))
|
||||
|
||||
def __invert__(self):
|
||||
"""
|
||||
Performs an EC_POINT_invert on itself.
|
||||
|
|
Loading…
Reference in New Issue