gf_deccrypt_string(string as_string) returns string
char lc_const[]={"[","e","n","g","l","i","s","h","@","]","-","(","c","h","i","n","a","1","0",")"}
integer k
integer li_len
integer li_sub
integer li_code
string ls_char
string ls_decrypt
if isnull(avs_string) or avs_string = "" then
return ""
end if
li_len = len(avs_string)
if avs_string = fill(char(255),li_len) then
return ""
end if
for k = 1 to li_len
li_code = asc(mid(avs_string,k,1))
li_sub = li_code - asc(lc_const[k])
if li_sub < 32 then
li_code = li_code + 126
if li_sub > 0 then
if asc(lc_const[k]) > 95 then
li_code = li_code - 95
else
li_code -= asc(lc_const[k])
end if
end if
end if
li_code -= asc(lc_const[k])
ls_char = char(li_code)
ls_decrypt = replace(ls_decrypt,k,1,ls_char)
next
return ls_decrypt