|
-
December 19th, 2010, 11:12 PM
#1
is it possible for a file with a customised extension to be non-readable to other app
i have created a file association by creating my own file extension. i have registered the new file extension to a particular application. i then opened notepad and put in a few sentences i and saved the file with my new file extension. when i click the file my program opens which is what i want to happen. however if i go through notepad or word and click open files and click the filename with the new extension the file opens and is readable, why is that?
i want it to be unreadable in other applications just like pdf files can't be read in word or notepad is what i want for my file extension. is this possible?
another problem is, my program is a login application, so the user has to log in to see and read the file, however when the user enters the correct info the file does not show. is there something i'm missing? am i required to write code in my program too? if so what?
-
December 20th, 2010, 02:44 AM
#2
Re: is it possible for a file with a customised extension to be non-readable to other
 Originally Posted by katy_price
... if i go through notepad or word and click open files and click the filename with the new extension the file opens and is readable, why is that?
Why not? 
It is how file system is designed!
 Originally Posted by katy_price
... i want it to be unreadable in other applications just like pdf files can't be read in word or notepad is what i want for my file extension. is this possible?
No, it is not possible.
Besides, no one (and nothing) forbids any other (not registered) application to read word or .pdf or any other file (the only problem for the application reading this file is to read and interpret it properly)
 Originally Posted by katy_price
another problem is, my program is a login application, so the user has to log in to see and read the file, however when the user enters the correct info the file does not show. is there something i'm missing? am i required to write code in my program too? if so what?
Perhaps, you should work with the user writes/permissions to read your files. not the file extensions?
Victor Nijegorodov
-
December 20th, 2010, 04:47 AM
#3
Re: is it possible for a file with a customised extension to be non-readable to other
Suggestion: Google "encryption algorithm c++"
-
December 20th, 2010, 04:50 AM
#4
Re: is it possible for a file with a customised extension to be non-readable to other
 Originally Posted by Morbane
Suggestion: Google "encryption algorithm c++"
Yes, an encryption looks like a good idea here!
Victor Nijegorodov
-
December 20th, 2010, 10:21 AM
#5
Re: is it possible for a file with a customised extension to be non-readable to other
 Originally Posted by Morbane
Suggestion: Google "encryption algorithm c++"
how would that work? how can i encrypt a file independant from my program? then get my program to decrypt it?
i can understand having my program encrypt it and decrypt it, but then obviously that wouldnt make sense because the file content can still be viewed by other apps.
-
December 20th, 2010, 10:26 AM
#6
Re: is it possible for a file with a customised extension to be non-readable to other
 Originally Posted by katy_price
en obviously that wouldnt make sense because the file content can still be viewed by other apps.
Yes.
But any other app won't be able to read the file content properly without the key for decryption.
Victor Nijegorodov
-
December 20th, 2010, 10:44 AM
#7
Re: is it possible for a file with a customised extension to be non-readable to other
 Originally Posted by VictorN
Yes.
But any other app won't be able to read the file content properly without the key for decryption.
ok, so i create a new program that encrypt the file. then when a user logs in my application to open the file my application will then decrypt it?
so il have too programs? one to encrypt and another (my login app) to decrypt
i am going to use the File::Encrypt Method to do this, do you think it will work? or is a good idea?
Last edited by katy_price; December 20th, 2010 at 11:15 AM.
-
December 20th, 2010, 01:22 PM
#8
Re: is it possible for a file with a customised extension to be non-readable to other
i want a file that is created lets say in notepad, to be encrypted. so that if another app other than mine opens it, the content isnt readable. i want when a user logs in to my application (with the correct credentials) for my application to call and open that notepad file in a readable mode (decrypted) so that a user can then read the file content. i want when the notepad file is open and the user can read, edit etc the file and then closes it for it still to be unreadable to other apps. how can i do this, bearing in mind that the File::Encrypt Method doesnt work on my system for some reason. i am working in windows 7 home edition 64 bit.
p.s my program ends by the way when the file is opened.
-
December 20th, 2010, 04:01 PM
#9
Re: is it possible for a file with a customised extension to be non-readable to other
i want it to be unreadable in other applications just like pdf files can't be read in word or notepad is what i want for my file extension. is this possible?
It's possible, if you're ready to invent your custom file format, and implement its support of course. This is exactly what those programs do: implement file format read/write. And this goes much far than just registration of a customized extension. Besides, custom file format generally has nothing common with encryption or content protection. As you may know, there are other programs that can read pdf files alright.
Best regards,
Igor
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
|