create c++ application with openssl lib (aes) to lock/unlock a "txt file"

Posted on 2004-11-22
Medium Priority
Last Modified: 2008-02-01
hi, is there any example on this available?  I interested in locking up a "txt" file using aes.  so each time the application is executed, user will be prompted for password . This pasword will be used to unlock the txt file.
Question by:second_comet
1 Comment

Accepted Solution

muskad202 earned 200 total points
ID: 12644461
what's the platform ??

e.g., if in windows , the following is a basic framewok of how the code would look like

(1) program starts, uses the api CreateFile to open the text file in READ mode, with the share setting to exclusive (so no one else can access it)
(2) prompts user for password
(3) if password is correct, then call CloseHandle to release the file lock, so that user can access it
(4) wait till user tells prog. to re-lock the file, at that point, go back to step(1)

u can place the program in the startup folder, so that the file gets locked at startup.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Introduction to Processes

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question