X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=cipher%2Fkeyword_cipher.py;h=2cf3290463d50ae6fbe9bb93e901eb9ba3ec8a19;hb=HEAD;hp=2db454cb3ef23e953a83d9129e174906ce2596a5;hpb=39c4ae8d56e4399d431cc3f0c782784f1d197eab;p=cipher-tools.git diff --git a/cipher/keyword_cipher.py b/cipher/keyword_cipher.py index 2db454c..2cf3290 100644 --- a/cipher/keyword_cipher.py +++ b/cipher/keyword_cipher.py @@ -208,6 +208,7 @@ def simulated_annealing_break(message, workers=10, 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 @@ -300,4 +301,4 @@ def simulated_annealing_break_worker(message, plain_alphabet, cipher_alphabet, return best_alphabet, best_fitness # current_alphabet, current_fitness if __name__ == "__main__": - import doctest \ No newline at end of file + import doctest