--- /dev/null
+1a: caesar_decipher(c1a, 8)
+1b: caesar_decipher(c1b, 14)
+2a: affine_decipher(c2a, 3, 3, True)
+2b: caesar_decipher(c2b, 6)
+3a: affine_decipher(c3a, 7, 8, True)
+3b: keyword_decipher(c3b, 'louvigny', 2)
helper_args = [(message, word, wrap, metric, target_counts,
message_frequency_scaling)
for word in wordlist for wrap in range(3)]
- breaks = pool.starmap(keyword_break_one, helper_args, chunksize) # Gotcha: the helper function here needs to be defined at the top level (limitation of Pool.starmap)
+ # Gotcha: the helper function here needs to be defined at the top level
+ # (limitation of Pool.starmap)
+ breaks = pool.starmap(keyword_break_one, helper_args, chunksize)
return min(breaks, key=lambda k: k[1])
def keyword_break_one(message, keyword, wrap_alphabet, metric, target_counts,