Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hash in a .prg?
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01155213
Message ID:
01155251
Views:
29
This message has been marked as a message which has helped to the initial question of the thread.
If a by-pass is what you are hoping to thwart, how about something like this... I personally use the md5.fll file for using the HASH() or HASHFILE(). Anyhow, if you want to make sure your going through the same process, and not bypassed, you could do something like...

Call the hash routine with some random string, pass phrase, etc... case sensitive, special chars, etc... Get ITs HASH value.

Then, in the startup of your program, when you begin, make a call to the hash routine (even if MS, SHA, MD5, etc). If the hashed value doesn't return what you are expecting, then somethings wrong... cancel out of the program. If it matches, then you are probably safe and can resume working...

You could even do something like getting a hash of your EXE thats running for uniqueness. Or even better, your EXE can have a hash of the VFPEncryption.fll... If your app starts, and you get a hash on that file differs from what you expect -- done... get out.



>Hey Mike,
>
>Thanks for taking time to post. However, my original post explained that I am actually trying to find a hash in a .prg so that it can be used to validate the vfpencryption.fll before it is used since it is not compiled into an .app or an .exe. I'm basically looking for a way to ensure that someone has not replaced vfpencryption.fll with their own .fll in an attempt to thwart my encryption.
>
>Hope that makes sense. If you're aware of SHA hash routines in .prg form, please let me know!
>
>Rodd
>
>>http://www.sweetpotatosoftware.com/SPSBlog/PermaLink,guid,0e9bc8b5-7172-49bc-8949-ccc883354818.aspx
>>
>>All kinds here including sha256 and sha512
>>
>>>Thanks for the link, Carlos. That definitely provides me with a few options. I was hoping to find something that did SHA256 or higher hashing since MD5 seems to be less secure.
>>>
>>>Your link may provide a solution if I'm unable to find anything doing SHA in VFP code.
>>>
>>>>>I was currently reading a thread on UT that mentioned checking the hash value of an encryption .fll to ensure that someone has not replaced the .fll with their own .fll in an attempt to hack one's security.
>>>>>
>>>>>We currently are attempting to integrate vfpencryption.fll into our system to provide us with stronger encryption. However, this and md5.fll are the only tools we have that enable us to create hash values. This kind of defeats the purpose of comparing a hash value of the fll if you have to use the fll to get the hash value in the first place.
>>>>>
>>>>>Does anyone know of a hashing routine written as a .prg?
>>>>
>>>>http://fox.wikis.com/wc.dll?Wiki~VfpMd5HashFunction
Previous
Reply
Map
View

Click here to load this message in the networking platform