From 1508a3378ee1521c8b053843ae02deac8e4c114f 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 88d091e357..7dbf4eb386 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