aboutsummaryrefslogtreecommitdiff
path: root/rsa
diff options
context:
space:
mode:
Diffstat (limited to 'rsa')
-rw-r--r--rsa/key.py10
-rw-r--r--rsa/pkcs1.py6
-rw-r--r--rsa/prime.py6
3 files changed, 11 insertions, 11 deletions
diff --git a/rsa/key.py b/rsa/key.py
index 479b8f0..17bf69e 100644
--- a/rsa/key.py
+++ b/rsa/key.py
@@ -116,7 +116,7 @@ class PublicKey(AbstractKey):
return getattr(self, key)
def __repr__(self):
- return u'PublicKey(%i, %i)' % (self.n, self.e)
+ return 'PublicKey(%i, %i)' % (self.n, self.e)
def __eq__(self, other):
if other is None:
@@ -272,7 +272,7 @@ class PrivateKey(AbstractKey):
return getattr(self, key)
def __repr__(self):
- return u'PrivateKey(%(n)i, %(e)i, %(d)i, %(p)i, %(q)i)' % self
+ return 'PrivateKey(%(n)i, %(e)i, %(d)i, %(p)i, %(q)i)' % self
def __eq__(self, other):
if other is None:
@@ -573,8 +573,8 @@ if __name__ == '__main__':
break
if (count and count % 10 == 0) or count == 1:
- print '%i times' % count
+ print('%i times' % count)
except KeyboardInterrupt:
- print 'Aborted'
+ print('Aborted')
else:
- print 'Doctests done'
+ print('Doctests done')
diff --git a/rsa/pkcs1.py b/rsa/pkcs1.py
index fbe9fe7..9686cf9 100644
--- a/rsa/pkcs1.py
+++ b/rsa/pkcs1.py
@@ -374,7 +374,7 @@ __all__ = ['encrypt', 'decrypt', 'sign', 'verify',
'DecryptionError', 'VerificationError', 'CryptoError']
if __name__ == '__main__':
- print 'Running doctests 1000x or until failure'
+ print('Running doctests 1000x or until failure')
import doctest
for count in range(1000):
@@ -383,6 +383,6 @@ if __name__ == '__main__':
break
if count and count % 100 == 0:
- print '%i times' % count
+ print('%i times' % count)
- print 'Doctests done'
+ print('Doctests done')
diff --git a/rsa/prime.py b/rsa/prime.py
index 340ab94..4dc190c 100644
--- a/rsa/prime.py
+++ b/rsa/prime.py
@@ -152,7 +152,7 @@ def are_relatively_prime(a, b):
return (d == 1)
if __name__ == '__main__':
- print 'Running doctests 1000x or until failure'
+ print('Running doctests 1000x or until failure')
import doctest
for count in range(1000):
@@ -161,6 +161,6 @@ if __name__ == '__main__':
break
if count and count % 100 == 0:
- print '%i times' % count
+ print('%i times' % count)
- print 'Doctests done'
+ print('Doctests done')