This is a discussion on A Stable Password Protection Program Like Facebook (Best Run in Turbo C++ 3.1) within the C Programming forums, part of the General Programming Boards category; Originally Posted by gardhr Sorry, your program is neither stable nor secure I know this is not secure, Please tell ...
Generally, you don't create an encrypted file in any special way (unless the data, when encrypted, contains binary data which means you need to open the file in binary mode). You create a file as normal, and then encrypt the data before writing it to the file. To read an encrypted file, read from the file and feed the data through an appropriate decryption before using int.
Some encryption libraries may provide special functions for opening and closing files. But, apart from alignment of files with buffers, that is just window dressing over the basic mechanics.
Last edited by grumpy; 04-14-2012 at 11:18 PM.
Right 98% of the time, and don't care about the other 3%.
Modern compilers to consider
Free Developer Tools - Visual Studio 2010 Express | Microsoft Visual Studio
smorgasbordet - Pelles C
In fact, download them all and see how you get on with each one.
One useful test to see if you've written a good program is to get it to compile and work using multiple compilers.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.