aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2019-04-24 05:52:24 +0000
committerEnji Cooper <ngie@FreeBSD.org>2019-04-24 05:52:24 +0000
commit351a56b11664c9229e61db4c51c2a1335c15bd72 (patch)
tree19100f5394aa6d0a15089c6ac044dc7b40493955 /tests
parent2a96ae15f0a3ecb1652f7cdfc64e0fd62766d670 (diff)
Notes
Diffstat (limited to 'tests')
-rw-r--r--tests/sys/opencrypto/cryptodev.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/sys/opencrypto/cryptodev.py b/tests/sys/opencrypto/cryptodev.py
index 98e4601f20a3..4f4ad943fd26 100644
--- a/tests/sys/opencrypto/cryptodev.py
+++ b/tests/sys/opencrypto/cryptodev.py
@@ -258,7 +258,7 @@ class Crypto:
return s, tag.tostring()
def perftest(self, op, size, timeo=3):
- inp = array.array('B', (random.randint(0, 255) for x in xrange(size)))
+ inp = array.array('B', (random.randint(0, 255) for x in range(size)))
out = array.array('B', inp)
# prep ioctl
@@ -273,7 +273,7 @@ class Crypto:
if self._maclen is not None:
m = array.array('B', [0] * self._maclen)
cop.mac = m.buffer_info()[0]
- ivbuf = array.array('B', (random.randint(0, 255) for x in xrange(16)))
+ ivbuf = array.array('B', (random.randint(0, 255) for x in range(16)))
cop.iv = ivbuf.buffer_info()[0]
exit = [ False ]
@@ -503,7 +503,7 @@ if __name__ == '__main__':
except IOError:
print('aesni0 not found')
- for i in xrange(10):
+ for i in range(10):
try:
name = Crypto.getcridname(i)
print('%2d: %r' % (i, repr(name)))
@@ -637,7 +637,7 @@ if __name__ == '__main__':
print('tag:', tag.encode('hex'))
assert enctag == tag
elif False:
- for i in xrange(100000):
+ for i in range(100000):
c = Crypto(CRYPTO_AES_XTS, '1bbfeadf539daedcae33ced497343f3ca1f2474ad932b903997d44707db41382'.decode('hex'))
data = '52a42bca4e9425a25bbc8c8bf6129dec'.decode('hex')
ct = '517e602becd066b65fa4f4f56ddfe240'.decode('hex')