Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Symmetric Key Encryption with CA
Message
 
 
To
10/04/2013 09:44:07
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01570592
Message ID:
01570595
Views:
37
>>Hi,
>>
>>How would you use Symmetric Key Encryption with CursorAdapter? (if it is possible). I have created a sample database with a table and the symmetric key (in SSMS). So in the SSMS I can use ENCRYPTBYKEY and KEY_GUID to add a record. For example:
>>
>>Insert into test (column1) values (ENCRYPTBYKEY(KEY_GUID('TestKey'),'New Value'))
>>
>>
>>But if you update the table (from VFP) using Cursor Adapter, would you write the code like above in VFP and the CA would work? And since functions ENCRYPTBYKEY and KEY_GUID are not available to VFP compiler, the code won't even compile. I searched UT (for a few years back) and no mention of key word 'ENCRYPTBYKEY'. Does it mean that Symmetric Key Encryption is not used with VFP applications? TIA for any input.
>
>You could set UpdateCmd and InsertCmd to match your request:
>
>CA.UpdateCmd = "UPDATE Table SET Column1 = ENCRYPTBYKEY(KEY_GUID('TestKey'),?Alias.Field) WHERE KeyField = ?Alias.KeyField"
>CA.InsertCmd = "Insert into Table (column1) values (ENCRYPTBYKEY(KEY_GUID('TestKey'),?Alias.Field))"
>
Usually I rely on the TableUpdate to take care of changes to the CA cursor. But I see that there is an alternative (as you suggest above) method. So I will need to see how to change my code for the table(s) that has an encrypted column. But something tells me (since I could not find any questions on ENCRYPTBYKEY in any older messages of UT) that the Symmetric Key Encryption may not be used much or at all with VFP applications.
Thank you very much.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform