X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=cipher%2Fkeyword_cipher.py;h=2cf3290463d50ae6fbe9bb93e901eb9ba3ec8a19;hb=53f5be76d47f795f02deab536f055a32de1abe46;hp=a135c2b0489f14e8d6835a716fbe7bfb611f8739;hpb=01adde8f28fb9fc89639c8e44be1782a76d12449;p=cipher-tools.git 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