Re: Using _crypt.vcx by Dan
Dan
Thu Aug 03 12:59:27 CDT 2006
Decrypt only when needed.
When our users log in, for instance, we don't decrypt passwords at all.
Rather we compare Encrypt(user-typed password) against the already encrypted
data on disk.
Dan
wickedbusa wrote:
> I haven't thought about that. I decided to just encrypt a couple of
> sensitive fields; however, taking into consideration with what you
> just mentioned, how would I go about setting up the app so multiple
> users can use the app without the issue you mentioned?
> Dan Freeman wrote:
>> In addition to Roger's comments, I'd add the standard multi-user
>> warning.
>>
>> If you "decrypt when in the app", how does the app know the 2nd user
>> is coming in? Does it go ahead and decrypt already-decrypted data
>> (producing garbage)?
>>
>> Tread carefully.
>>
>> Dan
>>
>> wickedbusa wrote:
>>> I'm using VFP 8. I took your advice and used the StrConv function.
>>> Works great. Is there a way to encrypt an entire dbf using this
>>> technique? I need to encrypt an entire dbf on close, then decrypt
>>> the dbf while it is open in the app. If there is an easy way to do
>>> this using this technique please let me know.
>>>
>>> Thank you so much for your help.
>>>
>>> Arvin
>>> Roger Ansell wrote:
>>>> wickedbusa wrote:
>>>>> Hello everyone. I am trying to encrypt the password field in my
>>>>> user dbf so that no one can read the password if the dbf is opened
>>>>> outside of the program. I wanted to use the _crypt class, but am
>>>>> not quite sure how to go about implementing it. I am new to VFP
>>>>> and am not too familiar with the function. I wanted to encrypt the
>>>>> password field in the dbf, then have the user login, have the
>>>>> program encrypt his/her password, and check the encrypted password
>>>>> with the encrypted password stored in the dbf. Does anyone have a
>>>>> procedure as to how I would go about doing this? I currently have
>>>>> a login form that checks passwords against a dbf.
>>>>
>>>> It depends on how secure your encryption really needs to be.
>>>> Personally, I think that using Windows Crypto API is overkill
>>>> for user login password encryption, although I do use it for
>>>> other purposes.
>>>>
>>>> Which version of VFP are you using?
>>>> From VFP8, check out the StrConv function which can encode/decode
>>>> a character expression to/from base64 binary and base64 hexbinary.
>>>> That should outfox ;-) all but dedicated hackers.
>>>>
>>>> - Roger