Program to decode scytale cypher



Hi!

I wrote a simple java program to decode scytale ciphers (columnar transposition). Here is the code:

private String Decode(int len) {
StringBuffer buf = new StringBuffer();
for(int i = 0; i < len; i++) {
for(int j = 0; j < cipher.length(); j = j + len) {
char ch;
if(i+j < cipher.length()) {
ch = cipher.charAt((i + j));
buf.append(ch);
}
}
}
return buf.toString();
}

Well it works for example for "kerhe lxdit atzfe rwufx ticrt" (klartext
wird zu chiffretext)

Then I found this message:
"IMAZNNDCABMEUUÜHLEARNRNRNRNWEIBNEAIDMSIOSRNAISNCNCEHBEHNHNIAIEHCENNMAHIND-DTN"

But I can't decode it ?? Works the code correctly?

THX!

Tobias
.