cTran1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" cTran2 = "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm" x = Encode("Hello, world") ? x ? Decode(x) RETURN FUNCTION Encode PARAMETER cRaw LOCAL I,cRet,cTmp cRet = "" FOR I=1 TO LEN(m.cRaw) cTmp = SUBSTR(m.cRaw,m.I,1) nPos = AT(m.cTmp,m.cTran1) IF m.nPos>0 THEN cRet = m.cRet + SUBSTR(cTran2,((m.nPos+m.I-2)%LEN(m.cTran1))+1,1) ELSE cRet = m.cRet + m.cTmp ENDIF ENDFOR RETURN m.cRet ENDPROC FUNCTION Decode PARAMETERS cCode LOCAL I,cRet cRet = "" FOR I=1 TO LEN(m.cCode) cTmp = SUBSTR(m.cCode,m.I,1) nPos = AT(m.cTmp,m.cTran2) IF m.nPos>0 THEN cRet = m.cRet + SUBSTR(m.cTran1,(m.nPos-m.I)%LEN(m.cTran2)+1,1) ELSE cRet = m.cRet + m.cTmp ENDIF ENDFOR RETURN m.cRet ENDPROCThe orignal encoding that I started with is a simple ROT13 (the alphabetic characters are "rotated" by 13 characters). I then proceeded to add a minor modification that would "shift" the encodings with each character to make the encoding a bit less obvious.