Raise ValueError if could not determine compressed or uncompressed point

pull/9/head
tuxxy 2017-12-28 13:12:31 -07:00
parent fe67072172
commit 9311c90b71
No known key found for this signature in database
GPG Key ID: 7BB971A0E89144D9
1 changed files with 2 additions and 0 deletions

View File

@ -133,6 +133,8 @@ class Point(object):
affine_y = int.from_bytes(data[1+key_size:], 'big')
return Point.from_affine((affine_x, affine_y), curve)
else:
raise ValueError("Invalid point serialization.")
def to_bytes(self, is_compressed=True):
"""