diff --git a/src/pyelliptic/ecc.py b/src/pyelliptic/ecc.py index 388227c7..8a972c90 100644 --- a/src/pyelliptic/ecc.py +++ b/src/pyelliptic/ecc.py @@ -24,22 +24,24 @@ class ECC(object): >>> bob = pyelliptic.ECC(curve='sect571r1') >>> ciphertext = alice.encrypt("Hello Bob", bob.get_pubkey()) - >>> print bob.decrypt(ciphertext) + >>> print(bob.decrypt(ciphertext)) >>> signature = bob.sign("Hello Alice") - >>> # alice's job : - >>> print pyelliptic.ECC( - >>> pubkey=bob.get_pubkey()).verify(signature, "Hello Alice") + # alice's job : + >>> print(pyelliptic.ECC( + >>> pubkey=bob.get_pubkey()).verify(signature, "Hello Alice")) - >>> # ERROR !!! + # ERROR !!! >>> try: >>> key = alice.get_ecdh_key(bob.get_pubkey()) >>> except: - >>> print("For ECDH key agreement, the keys must be defined on the same curve !") + >>> print( + >>> "For ECDH key agreement, the keys must be defined" + >>> " on the same curve!") >>> alice = pyelliptic.ECC(curve='sect571r1') - >>> print alice.get_ecdh_key(bob.get_pubkey()).encode('hex') - >>> print bob.get_ecdh_key(alice.get_pubkey()).encode('hex') + >>> print(alice.get_ecdh_key(bob.get_pubkey()).encode('hex')) + >>> print(bob.get_ecdh_key(alice.get_pubkey()).encode('hex')) """ @@ -53,7 +55,7 @@ class ECC(object): curve='sect283r1', ): # pylint: disable=too-many-arguments """ - For a normal and High level use, specifie pubkey, + For a normal and High level use, specify pubkey, privkey (if you need) and the curve """ if isinstance(curve, str):