PARA ENCRIPTAR
Función 1: f_encripta(as_origen)
String vls_char, vls_result
String vls_str1, vls_str2
int j
vls_str1 = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz1234567890/"
vls_str2 = "zaq1xsw2cde3vfr4bgt5nhy6mju7ki8lo9ñp0ZAQXSWCDEVFRBGTNHYMJUKILOÑP&"
vls_result = ""
FOR j=1 TO len(a_origen)
vls_char = mid(a_origen,j,1)
vls_result += mid(vls_str2, pos(vls_str1, vls_char), 1)
NEXT
RETURN vls_result
PARA DESENCRIPTAR
Función 2: f_des_encripta(a_origen)
String vls_char, vls_result
String vls_char, vls_result
String vls_str1, vls_str2
int j
vls_str2 = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZabcdefghijklmnñopqrstuvwxyz1234567890/"
vls_str1 = "zaq1xsw2cde3vfr4bgt5nhy6mju7ki8lo9ñp0ZAQXSWCDEVFRBGTNHYMJUKILOÑP&"
vls_result = ""
FOR j=1 TO len(a_origen)
vls_char = mid(a_origen,j,1)
vls_result += mid(vls_str2, pos(vls_str1, vls_char), 1)
NEXT
RETURN vls_result