summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rwxr-xr-xpython/samba/tests/krb5/kcrypto.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/tests/krb5/kcrypto.py b/python/samba/tests/krb5/kcrypto.py
index 79df0b58a3e..98b8465f3ab 100755
--- a/python/samba/tests/krb5/kcrypto.py
+++ b/python/samba/tests/krb5/kcrypto.py
@@ -279,9 +279,9 @@ class _DES3CBC(_SimplifiedEnctype):
b &= ~1
return b if bin(b & ~1).count('1') % 2 else b | 1
assert len(seed) == 7
- firstbytes = [parity(b & ~1) for b in seed]
+ firstbytes = bytes(parity(b & ~1) for b in seed)
lastbyte = parity(sum((seed[i] & 1) << i + 1 for i in range(7)))
- keybytes = bytes([b for b in firstbytes + [lastbyte]])
+ keybytes = firstbytes + bytes([lastbyte])
if _is_weak_des_key(keybytes):
keybytes[7] = bytes([keybytes[7] ^ 0xF0])
return keybytes