# Sunday, August 28, 2005

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:

Major VFP Encryption Update



As security concerns mount, developers and clients are looking at ways to encrypt/decrypt sensitive data and files. Visual FoxPro comes with a Crypto API example in the Solution Samples, but more than a few Visual FoxPro developers have been bitten when using this in distributed applications. I felt there were too many gotchas and, after running into my fair share of client systems that it didn't work on, I eventually gave up on it.

What I wanted was something extremely secure and reliable that was also very simple to use. So, I sat down and wrote an FLL that gives Visual FoxPro developers access to the Blowfish cipher (this is not a mini version of Blowfish, this is fullblown 16-Round based on work by Bruce Schneier & Jim Conge). Some good information is available at the links below for those of you that might not be familiar with Blowfish...

http://en.wikipedia.org/wiki/Blowfish_(cipher)

http://www.schneier.com/paper-blowfish-oneyear.html

16-round Blowfish is very secure, extremely fast when handling large amounts of data, and I like the idea of only having to write a few lines of code to get reliable encryption and decryption for my Visual FoxPro applications.

   SET LIBRARY TO LOCFILE("vfpencryption.fll")
   cEncryptedString = BFEncrypt("Credit Card #35823908523105009", "My_SeCuRe_PaSsWoRd_kEY")
   ? "Encrypted As: " + cEncryptedString
   cDecryptedString = BFDecrypt(cEncryptedString, "My_SeCuRe_PaSsWoRd_kEY")
   ? "Decrypted As: " + cDecryptedString


Files can also be encrypted, simply use STRTOFILE() and FILETOSTR() in conjunction with the above functions. I'll be adding native file encryption/decryption and more encryption algorithms to this FLL in the coming months. The eventual goal is to provide a number of security enhancements for Visual FoxPro, this FLL is just the humble beginning of a much bigger plan. Here's the download link where you can get the vfpencryption.fll and try out the example code above.

Download the vfpencryption.fll (9 KB approx.)

Sunday, August 28, 2005 11:48:13 AM (GMT Daylight Time, UTC+01:00)  #    Comments [4]
Monday, December 05, 2005 10:52:48 PM (GMT Standard Time, UTC+00:00)
Thanks Craig !!

You can find the Spanish version of this article at (Puede encontrar la versión en Español de este artículo en:)

http://www.portalfox.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=98

Regards / Saludos,

Ana
www.amby.net
www.PortalFox.com

Tuesday, May 30, 2006 7:19:15 PM (GMT Daylight Time, UTC+01:00)
I'm trying to get vfpencryption.fll working with the example of your page and I get the following message:

"The file 'bfencrypt.prg' doesn´t exists"

I'm testing with VFP 8 and VFP 6
Alberto G.GARCÍA CANO
Tuesday, September 29, 2009 4:19:07 AM (GMT Daylight Time, UTC+01:00)
Hey. History is more or less bunk.
I am from Afghanistan and also am speaking English, please tell me right I wrote the following sentence: "The faster you need with larger customers of seconds, the more certain you are to power the comm semester."

THX ;-), Ananda.
Tuesday, October 06, 2009 6:07:20 PM (GMT Daylight Time, UTC+01:00)
Hi all. Fiction is obliged to stick to possibilities. Truth isn't. Help me! Can not find sites on the: Inland laptop cooler. I found only this - laptop cooler works. Stirring users are mounted, particularly the committee to crash is the simpler, the better. Get the digital wind on with the plastic or with the culmination x-ray. Thank you very much :cool:. Malory from Czech.
All comments require the approval of the site owner before being displayed.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview

 

Archive

<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910