Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 17th, 2005, 3:59 AM   #1
Esmirna
Newbie
 
Join Date: Feb 2005
Posts: 10
Rep Power: 0 Esmirna is on a distinguished road
file securing

i would like to create a program in c++ able to avoid anyone else to read files. I was researching and I think that i could use the CreateFile windows.h function in order to get the handle of every file to secure instead of encrypting them

If i get the handle of a file this way with RD/WR permissions,would i be able to block anyone else reading,writing or moving those files while my program is open? or has it any security threat?
Esmirna is offline   Reply With Quote
Old Mar 17th, 2005, 10:39 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
How many files are we talking about here?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 18th, 2005, 3:02 AM   #3
Esmirna
Newbie
 
Join Date: Feb 2005
Posts: 10
Rep Power: 0 Esmirna is on a distinguished road
I was thinking in every document but the authorized ones. This means that can be a huge number...

I suposse you ask it because of the memory it could use. I had not think about it, but i understand the problems that handling a huge number of files could cause...

any other suggestion or did I understand the problem?
Esmirna is offline   Reply With Quote
Old Mar 18th, 2005, 8:42 AM   #4
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
You could set security and permissions on entire directories or individual files.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Mar 19th, 2005, 4:38 PM   #5
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Yeah if you wanted to block people open file handles and just make sure you specify the CreateFile flags which prevent file sharing... that is easy to do.. but once the handles are destroyed others will be able to get access to the files again.

It does not sound like cryptography is really what you want... you can encrypt the files, but other users can still modify the contents... it just mens that they will not be capable of interpreting the data within the files.
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:07 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC