Ok, I did a rewrite...

I've tested it with this ini:
 Code:
[Test 1]
Blocksize=5
Permutation=3,5,2,1,4
Input =Collegiate Programming Contest
Output=leoClaeigt orrPgmnmaio tCgntse
[test 2]
Blocksize=5
Permutation=3,5,2,1,4
Input =G, ,B
Output=B, ,G
[Test 3]
Blocksize=5
Permutation=3,5,2,1,4
Input ="ACM"
Output="MCA"
[Test 4]
Blocksize=5
Permutation=3,5,2,1,4
Input =Springfield, MA
Output=rnpSiilfgeA, Md
[Test 5]
Blocksize=5
Permutation=5,3,4,2,1
Input =Springfield, MA
Output=nripSliefgA, Md
[Test 6]
Blocksize=10
Permutation=3,5,2,1,4,6,10,9,8,7
Input =This is a very long text, something I hope will work
Output=iihT ss r evao glyn tstx, eehmotihI g neip owlr owlk

(changed permutation order in test 5, increased block-size in test 6)

and the result is:

 Code:

KiXtart
KiXtart Version  = 4.52
KiXGolf Script   = kixgolf_ts.kix

Computer
OS               = Windows XP Professional
CPU              = Intel Pentium Model 13
Speed            = 2261 MHz
Memory           = 1024 MB

KiXGolf Scoring Engine
Scoring Engine   = 3.3

KiXtart Golf Score
Tournament       = Top Secret
Processing Start = 2007/08/07 09:37:43.312
Processing End   = 2007/08/07 09:37:43.328
Duration         = 0000/00/00 00:00:00.016
KiXGolf Score    = 441
 
Thank you for participating in KiXtart Golf!


\:D \:D \:D
_________________________
The Code is out there