aboutsummaryrefslogtreecommitdiff
path: root/scripts/time-signature.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/time-signature.py')
-rwxr-xr-xscripts/time-signature.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/time-signature.py b/scripts/time-signature.py
index 732eaa4..5c816ee 100755
--- a/scripts/time-signature.py
+++ b/scripts/time-signature.py
@@ -99,7 +99,7 @@ def main():
p11 = PKCS11(args.libpkcs11)
if not args.quiet:
- print "Initializing"
+ print("Initializing")
p11.C_Initialize()
session = p11.C_OpenSession(args.slot)
@@ -107,25 +107,25 @@ def main():
for name in args.keys:
- print "Starting test with key {}, {} iterations".format(name, args.iterations)
+ print("Starting test with key {}, {} iterations".format(name, args.iterations))
k = key_table[name]
k.create(args, p11, session, "Your mother was a hamster")
mean = datetime.timedelta(seconds = 0)
- for i in xrange(args.iterations):
+ for i in range(args.iterations):
t0 = datetime.datetime.now()
p11.C_SignInit(session, k.ckm, k.handle)
sig = p11.C_Sign(session, k.tbs)
t1 = datetime.datetime.now()
k.verify(sig)
if not args.quiet:
- print "{:4d} {}".format(i, t1 - t0)
+ print("{:4d} {}".format(i, t1 - t0))
mean += t1 - t0
mean /= args.iterations
- print "mean {}".format(mean)
+ print("mean {}".format(mean))
p11.C_DestroyObject(session, k.handle)