Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cipher for VFP (Storing encrypted Keys)
Message
From
06/06/2003 12:02:17
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, United States
 
 
To
05/06/2003 14:28:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00796234
Message ID:
00797311
Views:
43
Raj,

>I am doing this for encrypting the data:
>
>select keytbl
>REPLACE ALL lickey WITH Encrypt(lickey, lcEncryptPassword)


CIPHER50 is a reversable encryption algorithm. Therefore, if you encrypt...

lcEncryptedString=ENCRYPT("myString","myPassword")

you would typically unencrypt like this...

lcPlainText=DECRYPT(lcEncryptedString,"myPassword")

However, you could also unencryt like this...

lcPlainText=ENCRYPT(lcEncryptedString,"myPassword")

Notice I used the "ENcrypt" command to decrypt.

What you may have done is issue your REPLACE command more than once, and therefore the "lickey" field in the table may be holding a plaintext data value instead of an encrypted string.

I would recommend starting from scratch and going one step at a time and use the debugger to check your values each step. It's simple, once you see what's happening.

Guy
Previous
Reply
Map
View

Click here to load this message in the networking platform