projects
/
cipher-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Done challenge 6
[cipher-tools.git]
/
cipher
/
keyword_cipher.py
diff --git
a/cipher/keyword_cipher.py
b/cipher/keyword_cipher.py
index 2db454cb3ef23e953a83d9129e174906ce2596a5..2cf3290463d50ae6fbe9bb93e901eb9ba3ec8a19 100644
(file)
--- 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
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
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__":
return best_alphabet, best_fitness # current_alphabet, current_fitness
if __name__ == "__main__":
- import doctest
\ No newline at end of file
+ import doctest