From 53f5be76d47f795f02deab536f055a32de1abe46 Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Sat, 9 Nov 2019 19:55:20 +0000 Subject: [PATCH 1/1] Fixed merging bug --- cipher/keyword_cipher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cipher/keyword_cipher.py b/cipher/keyword_cipher.py index a135c2b..2cf3290 100644 --- a/cipher/keyword_cipher.py +++ b/cipher/keyword_cipher.py @@ -206,6 +206,9 @@ def simulated_annealing_break(message, workers=10, fitness=Ptrigrams, chunksize=1): worker_args = [] ciphertext = sanitise(message) + if swap_index_finder is None: + swap_index_finder = gaussian_swap_index + for i in range(workers): if plain_alphabet is None: used_plain_alphabet = string.ascii_lowercase -- 2.34.1