From 6647331268a8c69d321dd84d0db27fa33f685559 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 2 Apr 2020 19:06:44 +0200 Subject: [PATCH] fixup: python can do the swap in a 1-liner --- src/borg/crypto/key.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/borg/crypto/key.py b/src/borg/crypto/key.py index a4644bcaf4..f689ef7439 100644 --- a/src/borg/crypto/key.py +++ b/src/borg/crypto/key.py @@ -369,9 +369,7 @@ def _derive_byte_permutation(key_material): for i in range(256): pool, offset = divmod(pool, 256-i) j = i + offset - tmp = perm[i] - perm[i] = perm[j] - perm[j] = tmp + perm[i], perm[j] = perm[j], perm[i] if pool == 0: # the pool value was less than 256!, we have an unbiased choice