Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_cryptapi failing as a standalone EXE 1

Status
Not open for further replies.

fordgt40

Programmer
Jan 8, 2003
1
US
I am trying to encrypt a file using the _cryptapi class provided in the FFC folder. Everything works fine when I run after build from inside foxpro. As a standalone .exe it is not working even though it appears the methods on the class are getting called (verified by adding WAIT messages in the methods).

Only running on one machine with XP

Thanks for any help on this I've been racking my brain!!


 
fordgt40,

I've had problems with the _cryptapi working reliably as well in the past and others have reported similar problems. There might be a solution to the problem you are having, but I use an FLL that I wrote that is freely available on my blog. Feel free to use it with your application if you want. It has more features than the _cryptapi class and I think you'll find it much simpler to use. Here's the link to the blog entry where you can get it... VFP Encryption FLL



boyd.gif

SweetPotato Software Website
My Blog
 
I second Craig's recommendation. After experiencing difficulties in correctly decrypting values using a class I created around the underlying Crypto API and posting a thread here Craig relayed that he and others experienced similar problems. I've played with Craig's FLL and found that it works well even though I don't use it in my apps as it provides more functionality that I need.

I opted for an approach that uses an older version of Cryptor that we already own and a C based Blowfish DLL based on Bruce Schneier 's code that you can find on his site.

Schneier.com

I also don't use the Cryptor FLL as that locks you into purchasing new FLLs from XiTech as you upgrade VFP. If you call the Cryptor DLL as an API you're not tied to a version specific FLL. I'm not against giving XiTech more money it's just that I don't want the maintenance issue of having to upgrade another file. Mamma always said to keep things simple for simple minds.

One benefit of this approach is that with Cryptor the files are always protected at the file system and its simple to add to an existing app. With Blowfish you have the option of a publically recognized cipher, unlike Cryptor.

Ralph Kolva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top