*( This is The encript Function or Method *{ Encodes the text password that is passed to this method. *{ A random character is created and plugged in front of the *{ encoded password. LPARAMETERS lPassword LOCAL lRandChr, lEncodePass, lPassword lRandChar = CHR( ASC( RIGHT( SYS( 3), 1)) + 101) && Random character lEncodePass = "" *{ Create characters from the password FOR nCnt = 1 TO LEN( ALLTRIM( lPassword)) lEncodePass = lEncodePass + ; CHR( ASC( SUBSTR( lPassword, nCnt, 1)) + 101) ENDFOR *{ Add the random character in front of the encoded password lEncodePass = lRandChar + lEncodePass RETURN lEncodePassAnd this Is the Decription
*{ Decodes the encrypted password that is passed to this method. *{ A random character is removed from the front of the *{ encoded password before decoding. LPARAMETERS lCrypted LOCAL lCrypted, lDecryptedpass lCrypted = SUBS( lCrypted, 2) && Remove random character lDecryptedpass = "" *{ Decode the encrypted password FOR nCnt = 1 TO LEN( ALLTRIM( lCrypted)) lDecryptedpass = lDecryptedpass + CHR( ASC( SUBS( lCrypted, nCnt, 1)) ; - 100) ENDFOR RETURN lDecryptedpassAdd this in a prg or a Method in your form. Call it and see what happens.