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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encrypting Files

Status
Not open for further replies.

PatMcLaughlin

Programmer
Dec 10, 2010
97
US
I have a request to write a program that will get a file, encrypt it, and then ftp it to a user. The first and last are easy, but I have never tried encrypting anything in foxprow 9.0. I have tried to read up on it but I do not understand 1/2 of what I am reading and have found no examples. Can you help me out.
 
First of all both you and the recipient need to agree on a single, common form of encryption.

One of the most secure common methodologies is PGP.
But my personal experience with PGP was less than favorable.
So, since my recipient was requiring PGP encryption, I went with GPG4Win which is compatible and I found much easier to use.

IF you both decide on that encryption methodology, then you can find GPG4Win at:
And you do a search in this forum for: GPG4Win to get some additional references

And doing a Google search for: gpgwin youtube will yield some more helpful references.

However if you both decide on some other encryption methodology you would need to look up how to accomplish that.

Once you have the file Encrypted, then it sounds like you already know how to send it.

Good Luck,
JRB-Bldr
 
The core question is what encryption is required or you are entitled to use.

If the essential request is to have the file encrypted with a best practice encryption and your app also should later download and decrypt the file, you can use what works best for you and AES as offered by VFPEncryption is a good candidate for a single symmetric key encryption.

If the file needs to be encrypted in a certain way with a certain certificate and public key, well, you have to follow that rules.

So what exactly is asked for?

Bye, Olaf.
 
This will be a new program, and I can dictate the form of encryption/key. The files will go to a small number (under 10) users.
 
Then I'd use VFPEncryption FLL and it's ENCRYPTFILE() and DECRYPTFILE() functions.

Bye, Olaf.
 
Keep in mind that whatever you Encrypt, your user(s) must be able to readily Decrypt.

The ease with which the user(s) can Decrypt a file may depend on their level of IT experience/comfort and the answer to that may influence the approach you take.

While not 'real' ENCRYPTION, sometimes something as easy as Password protection of something like a ZIP file is sufficient for less competent receivers. Even the minimally experienced can generally enter a Password and UnZip a file.

If 'real' ENCRYPTION is required, then it isn't really only up to you to solely dictate.
For example: You could decide on the very BEST, most SECURE Encryption methodology out there, but if the users were not be able to figure out how to execute the Decryption, then it is of no use.

I'd suggest that you first survey your recipient base and determine the level of IT competence that they have and what that might mean in regards to which approach you implement.

If your VFP application is to both Encrypt the files and also Decrypt the recipient's file for them, then you might want to consider:
or

Good Luck,
JRB-Bldr
 
JRB-Bldr has good points, I assume you en and decrpyt the files, the only requirement is to transfer them encoded.

Bye, Olaf.
 
In any discussion of encryption, you have to know what level of encryption you are aiming for.

If your aim is simply to stop a file being read by a casual observer, then it might be enough to create your own encryption routine, based on a fixed key which is hard-coded in an EXE. You can do that quite simply in VFP, without recourse to external components or services.

But if you are worried about a determined hacker breaking into your confidential information, then you will need a professional-level security system (including perhaps some of those mentioned in this thread).

In practice, in most cases the requirement falls between those two extremes. The point is that the discussion will be much more useful once you've determined the appropriate level for your needs.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top