|
-
December 20th, 2010, 05:09 PM
#1
[RESOLVED] how can i encrypt a file?
what i want to do is open a file using my application only, i have a winforms program created in c++/cli. my program will call and open a specific file when a user enters the right credentials. at the moment i am using the system() function to do this.
system("C:\\Users\\katy\\Desktop\\monk.drn.txt");
my problem is that this file can be opened by any other app. so what i was told to do was to create a file extension, so that when that file is clicked only my program will open, which i did.*** however this didnt actually work has i first thought it would, because when the user logged in, the system() function opened the file, which then ran my program again....(because my program is associated with the file) which is not what i wanted. i want if the user clicks the file > my program opens> they log in> the file shows.
anyways i found that by using the file extension that a user can go through another root and open and view the file in other apps such as word etc.....so then i decided to go for encrypting the file. however i wasnt sure how encrypting and decrypting the file would work in my program because its a login program, i have tried the encrypt and decrpyt functions msdn doc showed but that didnt work, is there an alternative method of doing this can anyone help please???
Last edited by katy_price; December 20th, 2010 at 05:12 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|