maciep, sorry but your code is the loosest
and yet, the finest.

Code:
function vigenere($t,$k,optional $d)
dim $j,$r,$,$p,$o,$y
for $j = 65 to 90
$ = chr($j)+$+chr($j+32)
next
$p = "0123456789"+$
for $j = 1 to len($t)
do
$ = left($k,1)
$k = substr($k,2)+$
$y = instr($p,$)
until $y
$ = substr($t,$j,1)
$o = $o+($=" ") -$o*(0<instr('!.?',$))
$r = instr($p,$)
if $r
$ = 62 - (ucase($t+$k)=$t+$k)*26
$=substr($p, (iif($d,$-$y,$y)+$r+o-1) mod $+1,1)
endif
$vigenere = $vigenere + $
next
endfunction



makes it 360.
_________________________
!

download KiXnet