IMPORTANT: The functions within this FLL have changed. Please refer to the latest documention for the VFP Encryption FLL that can be found at the following link (though this example and is still valid and will work unmodified using the current version of the VFP Encryption FLL):



http://www.sweetpotatosoftware.com/blog/index.php/2005/09/01/visual-foxpro-encrypt-and-decrypt-files/






Real World Examples
In my last blog entry I mentioned being able to use the vfpencryption.fll in some real world ways. While encrypting passwords and sensitve data using the ciphers, or checking passwords and files for authenticity using hash functions are pretty well known examples, there are others.

Generating CD Licenses
What about creating software serial numbers for an application you have developed? While I highly recommend a product like Armadillo when you need top-notch security, a more simplified approach that is still fairly secure can be had using a hashing function such as MD5.


Phil Fresle’s Earlier Work
I remembered seeing an example of this a few years back by a developer named Phil Fresle (back then his example was simpler than it is now). And, since the vfpencryption.fll now supports MD5, I thought I would revisit his example and see whether something of this nature could be created for Visual FoxPro using the vfpencryption.fll.


Here is the download link and screen shot of what I came up with.


Download VFP Key Generator Example – source code included (80 KB approx)
* A reader reported having a problem unzipping the vfpkeygen.zip, so I have reuploaded it.