Kevin, Your key isn't really a key -- RC4 is a 128 bit encryption algorithm, which requires a 128 bit key. If you change the KEY.ACTION to 2 (generate a real key from the passphrase), you should get different results. You can (and should) use a long passphrase made up of pseudo-random numbers, upper- and lower-case letters and symbols to make your encryption more difficult to crack.
You can also set CRYPT.ACTION to 2 to have the ENCRYPT() function base64 encode the result, so that it's safe to store in the database. Otherwise, you could end up with attribute, value or sub-value marks in your encrypted string. Use CRYPT.ACTION = 4 to base64 decode before decrypting. Larry Hiscock Western Computer Services http://www.wcs-corp.com -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King Sent: Tuesday, March 02, 2010 7:57 AM To: U2 Users List Subject: Re: [U2] Examples of working ENCRYPT function? Here's my code to date: * * Test Encryption Program * ALGORITHM = 'rc4' CRYPT.ACTION = 1 TEXT = 'THIS IS A TEST' TEXT.LOC = 1 KEY = 'ABCDEFG' KEY.LOC = 1 KEY.ACTION = 1 SALT = '' IV = '' RESULT = '' RESULTLOC = 1 STATUS = ENCRYPT(ALGORITHM, CRYPT.ACTION, TEXT, TEXT.LOC, KEY, KEY.LOC, KEY.ACTION, SALT, IV, RESULT, RESULTLOC) PRINT 'STATUS = ' : STATUS PRINT 'RESULT = ' : RESULT PRINT 'RESULTLOC = ' : RESULTLOC STOP END And here's what it shows: > RUN USER-FORMS TEST.ENCRYPT STATUS = 1 RESULT = RESULTLOC = 1 What am I missing? _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users