Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Encryption and E-mail
Message
De
18/08/2006 18:52:14
 
 
À
17/03/2003 12:34:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00766405
Message ID:
01146916
Vues:
39
>
>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

Your sample code works wonders. I encrypt reports in .doc format and then email as attachment. Question is, how can the recipient (who doesn't have VFP) decrypt the attachment?

TIA!
Thanks!
~d
J
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform