- function crypte
- parameters chaine
- local l_crypt_lg,l_crypt_ch,l_crypt_tm,l_crypt_i
- chaine = padr(chaine,20)
- l_crypt_lg=len(chaine)
- l_crypt_ch=""
- for l_crypt_i=1 to l_crypt_lg
- l_crypt_tm=asc(substr("WHATEVRYUXZY",mod(l_crypt_i,11),1))
- l_crypt_tm=mod(asc(substr(chaine,l_crypt_i,1))+l_crypt_tm,255)
- l_crypt_ch=l_crypt_ch+chr(255-l_crypt_tm)
- endfor
- return l_crypt_ch
- endfunc
-
- ? crypte(crypte("ceci est un test"))
function crypte
parameters chaine
local l_crypt_lg,l_crypt_ch,l_crypt_tm,l_crypt_i
chaine = padr(chaine,20)
l_crypt_lg=len(chaine)
l_crypt_ch=""
for l_crypt_i=1 to l_crypt_lg
l_crypt_tm=asc(substr("WHATEVRYUXZY",mod(l_crypt_i,11),1))
l_crypt_tm=mod(asc(substr(chaine,l_crypt_i,1))+l_crypt_tm,255)
l_crypt_ch=l_crypt_ch+chr(255-l_crypt_tm)
endfor
return l_crypt_ch
endfunc
? crypte(crypte("ceci est un test"))