My program requires password to open some features. The password can be set by an administrator. My app stores the password in a file. But, if the file was deleted or damaged, the app loose the password. Another scenario is if the file was replaced with original file then the password will be empty. Any suggestions about storing a password in a file?

edited :
My app has a feature. The feature is protected by a password that can be set by a admin (owner of the PC). Guest should enter password to disable that feature.
OS : Windows

There are 2 answer(s) to this question.

You can't protect the file from being deleted. In that case just don't allow any user to log in to your application (same applies if the password is empty).

If you store passwords in a file (or anywhere really) you should hash them (e.g. using md5 or sha1). So they can't be read in plaintext. To check the password during login just do (basic example in php):

Protect Your Mac From SPIES! -
Want to lock your Mac with a single shortcut, including password protection? On today's Tekzilla DaiProtect Your Mac From SPIES! - Tekzilla Daily TipWant to lock your Mac with a single shortcut, including password protection? On today's Tekzilla Daily, Veronica shows you how to do just that, without third party software!

ESET Nod32 Antivirus 4 Usernam
1. DOWNLOAD: tnij.org or fastyshare.com or sharecash.org 2. Run program and click Create Key (usernaESET Nod32 Antivirus 4 Username & Password 20111. DOWNLOAD: tnij.org or fastyshare.com or sharecash.org 2. Run program and click Create Key (username + password) 3. Enjoy! ESET products remain the best virus protection available in 2010, whether it's ESET NOD32 Antivirus or ESET Smart Security (built with the same ThreatSense® engine as ESET NOD32 Antivirus). Direct comparisons, including competitive, detection and performance advantages against other antivirus solutions tell the story better than we ever could. ESET NOD32 Antivirus uses a powerful combination of advanced heuristic technologies and automatic updates of malware signature databases, detecting and eliminating a rapidly growing number of unknown threats. Make your online experience safer. Enjoy all your favorite online activities, including sharing music, video, and other files with your friends, while protected by ESET's award-winning technology, now uniquely engineered for the Mac platform. Includes complimentary online Mac safety training. Gamers have always been particularly vulnerable to attacks because of their prolonged online activity and use of peer to peer networks. But now that you are being specifically targeted by phishing scams and password stealers, protection has never been more important.

C++ Programming Tutorial 4: Pa
This is how to password protect your program. If you don't get how to do certain things in the videoC++ Programming Tutorial 4: Password Protected Program - EasyThis is how to password protect your program. If you don't get how to do certain things in the video, watch the previous tutorials. Source Code: www.mediafire.com

Javascript Tutorial 1 - Passwo
A very simple script for password protection. Don't use this for highly sensitive information - it'sJavascript Tutorial 1 - Password Protection For Your Webpages (HD)A very simple script for password protection. Don't use this for highly sensitive information - it's not completely secure, though it will stop any novices from gaining entry to your page. Here's a link to the script: www.tutorialforums.freeforums.org ---- www.dreamwarez.co.uk

Keka Mac App
In this video I'm introducing an application I found recently called Keka, and it offers more advancKeka Mac AppIn this video I'm introducing an application I found recently called Keka, and it offers more advanced extraction and archival techniques when compared to other applications such as the unarchiver in Mac OS X. It offers splitting archived files as well as the reverse, lets you archive into a number of file types when compared to the built in finder archiver, which only archives into zip format. Password protection is also a feature, and best of all (I forgot to mention this in the video) it's completely free! Growl support is built in, which is quite useful. You can find the app here: www.kekaosx.com You can find me on twitter at www.twitter.com/picotweet and my blog's at www.picotweet.blogspot.com By the way when I was spelling out the URL I said "x" in the video since I'm referring to the letter "x" and not "mac os ten." Thanks for watching.

Data Privacy: Your Digital Lif
www.SafeHouseExplorer.com A hilarious and whimsical satire about the perils which can befall our perData Privacy: Your Digital Lifewww.SafeHouseExplorer.com A hilarious and whimsical satire about the perils which can befall our personal and private information in this digital age when we don't take steps to protect it using free encryption software for hard disks, Flash drives and USB memory sticks. SafeHouse Explorer is free encryption software for Windows which can password protect and hide your secret files on any hard drive or memory stick. Super simple. Nothing to learn. Just download and start using it.

Antivirus Software Tech Suppor
Software CD page: antivirus-software.tech.officelive.com antivirus-software.tech.officelive.com The Antivirus Software Tech SupportSoftware CD page: antivirus-software.tech.officelive.com antivirus-software.tech.officelive.com The Total Internet Security CD is a service we provide for website visitors who would prefer to have an installation CD rather than doing all the downloads online, and like the idea of having tech support when needed. All of the software you need to give your computer real protection from virus infections, spyware, adware, trojans, etc. is on this CD. A good firewall and other effective tools to protect your online privacy are included, with protection against fraud, phishing, scams, keyloggers, and hackers. You will have a selection of over twenty top rated security products to choose from. This is permanent software, not some trial version that you have to pay for later.* We have included the best software products tested by independent labs and security experts. Any software that we send you also had to pass our tests for quality and effectiveness before we approve it. 1. Five top rated antivirus products. You get to use the one you like the best for as long as you want. 2. Five of the best anti-malware products. 3. Three of the most secure firewalls, so you can use the one that works best on your computer. 4. The most secure web browsers for Windows, plus security ad-ons. 5. Your personal privacy sheild and password encrypting tools. 6. Anti-fraud and anti-phishing filters for your web browsers. 7. A tune up utility for your computer. 8. Easy installation instructions ...