mirror of https://github.com/nucypher/pyUmbral.git
15 lines
328 B
Python
15 lines
328 B
Python
from umbral.bignum import BigNum
|
|
from cryptography.hazmat.primitives.asymmetric import ec
|
|
|
|
def test_from_to_int():
|
|
curve = ec.SECP256K1()
|
|
x = BigNum.gen_rand(curve)
|
|
|
|
xint = x.__int__()
|
|
print()
|
|
print("xint: ", xint)
|
|
|
|
y = BigNum.from_int(xint, curve)
|
|
print("yint: ", y.__int__())
|
|
|
|
assert x == y |