I found quite a few solutions that all had problems cracking a personal test case of mine.
decode_vigenere(
"DOESNOTWORKINALLCASES",
"RVSZBVLKQFYTBHZSQHKSU",
"VLFLOUWLCADWSVTHPYGYGBQLGL"))
This should yield the outcome:
HEREANEXAMPLEOFABROKENCASE
The original key was "OHOHOHSOCOOL". In the solutions that were not able to crack the code, the two most standard issues were using "OHOHOHSOCOOLOHOHOHSOC" as the key (which only works if len(newencrypted) <= len(oldencrypted)) and using "OH" as the key (due to using a wrong algorithm for detecting the key based on the repetition pattern).
Maybe it is a good idea to add a test for a case like this to the test set?
Created at: 2014/11/06 21:22; Updated at: 2015/08/10 13:30