Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Encryption and E-mail
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00766405
Message ID:
00766615
Vues:
37
>I currently use MAPIMAIL in my VFP 7 application to send E-mail with attachments that are VFP tables. This class seems to be very stable.
>
>The operating systems range from Windows 98 to XP PRO and the E-mail programs are Microsoft Outlook and Outlook Express.
>
>I am considering encrypting the data and would appreciate any suggestions as to which classes or third party products to use for both the E-mail and encryption that have a proven track record of working together.


I like the Windows Crypto API. Have not used it with Win98 but have successfully with Win2K and WinXP. It's free and it is included with Windows. There is a good sample in the VFP7/VFP8 FFC.

There is an issue with the Crypto Provider between OS. The default Crypto Provider is different for Windows 2000 and XP. It is Microsoft Base Cryptographic Provider (Rsabase.dll) for Windows 2000 and Microsoft Enhanced Cryptographic Provider (Rsaenh.dll) for Windows XP. To fix it, try to set the 'cprovidername' property of the _cryptapi class to "Microsoft Base Cryptographic Provider v1.0" which is a value of dsMS_DEF_PROV_A constant in the wincrypt.h include file. Have not tried it with Win98.
* Quick sample code:
oCrypt = NewObject("_CryptAPI",Home(1) + "ffc\_Crypt")
If not oCrypt.GetIsInstalled()
  MessageBox("Error")
  Return .F.
EndIf

cDecryptedFilename = "c:\temp\mydata.dbf"
cPassWord = "fox rocks!"
cEncryptedFilename = "c:\temp\mydata.enc"

oCrypt.EncryptSessionStreamFile(cDecryptedFilename, cPassWord, cEncryptedFilename)

* to revert:
*oCrypt.DecryptSessionStreamFile(cEncryptedFilename, cPassWord, cDecryptedFilename)
HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform