Quote Originally Posted by katy_price View Post
Code:
encryption:
String ^strInputFileName ="peter.txt"; 
String ^strOutputFileName = "hungry.txt";

decryption:
String ^  strInputFileName = "hungry.txt";
String ^strOutputFileName ="peter.txt"; 

reencryption:
String ^strInputFileName =  "peter.txt";;
String ^strOutputFileName = "hungry.txt";
This looks correct, provided that the password parameter is the same for all three calls and the mode parameter is set to true, false, true, in that sequence.

this doesnt work how i would like it too because the hungry file remains in plain text which makes it visible to other apps.
What do you mean by "remains unencrypted"? Based on the sequence described above, there never should be an unencrypted file named hungry.txt at all.

if i put a new filename in the outputfile for decryption , when that file is edited it doesnt get updated when re-encrypted.
Maybe the file you re-encrypt actually isn't the file that you have edited?

sorry am abit confused do you know how i can get it to run how i would like?
Well, unfortunately your description of what's going on isn't really clear. Some more information might be helpful, maybe with code.

Note that if you use the user's password as the password parameter to Crypt(), you need an individual encrypted file for each user, even if the original plaintext file should be the same for all users. That's because the contents of the file the encryption results in of course depends on the password.