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/10 18:52:26.453
Processing End = 2007/08/10 18:52:26.484
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 330

Thank you for participating in KiXtart Golf!




 Code:
; begin Top Secret
;
;!
Function a($l,$b,$c,$d)
 /*
 1) the block length
 2) the permutation
 3) the message to be encoded or decoded
 4) a parameter denoting encoding (E) or decoding (D)
 */

dim $i, $, $r, $k, $o[$c^0]

For $i=0 to $c^0
  $=Substr($c,$i+1,1)
  $a=LCase($)
  If $a>` & $a<}
    $k=$k+$
    $r=$r+" "+$i
  EndIf
  $o[$i] = $

  If ($k^)=$l | $i=($c^)
    for each $ in Split($b,",")
      If 0 + $ <= ($k^)
        $a=$a+" "+$
      EndIf
    Next
    $a=split($a)
    For $=1 to $k^0
      $o[split($r)[iif($d=E,$,$a[$])]] = substr($k,iif($d=E,$a[$],$),1)
    Next
    $r='' $k=''
    $a=join($o,'')
EndFunction
;!
;!
; end Top Secret
_________________________
The Code is out there