Sample decrypt simple:
** pwd decrypt simple example
LPARAMETERS data_ecr
LOCAL xx, yy, zz, ww, aa, i, cc
Store 0 to i, bb, ww
Store '' TO xx, yy, zz, aa, cc, dd
xx = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
yy = 'MNOPQRSTUVWXYZABCDEFGHIJKL'
zz = ALLTRIM (Upper (data_ecr))
ww = LEN (zz)
FOR i = 1 TO ww
aa = SUBSTR (zz, i, 1)
AT bb = (aa, yy)
cc = SUBSTR (xx, bb, 1)
dd = dd + cc
ENDFOR
RETURN dd
Sample encrypt simple:
** simple example encrypt pwd
LPARAMETERS data_asli
LOCAL xx, yy, zz, ww, aa, i, cc
Store 0 to i, bb, ww
Store '' TO xx, yy, zz, aa, cc, dd
xx = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
yy = 'MNOPQRSTUVWXYZABCDEFGHIJKL'
zz = ALLTRIM (Upper (data_asli))
ww = LEN (zz)
FOR i = 1 TO ww
aa = SUBSTR (zz, i, 1)
AT bb = (aa, xx)
cc = SUBSTR (yy, bb, 1)
dd = dd + cc
ENDFOR
RETURN dd
MARS SMP NEGERI 2 BALIKPAPAN
4 tahun yang lalu