c# - set a window to open once only unless needed -


i designing password encryption application, , want password protect database created when software first started, password user chooses.

so how set application run part once in lifetime? , how assign textbox value sql compact edition databases password?

p.s using sha256 encryption random salts , hashing, in case wants tell me better way?

please help

for first part, how execute once. mark field flag in database or create new table flags , check value on form_load if flag found, open other default form, such dashboard etc.

for second part, full understanding , attack problem, here: http://msdn.microsoft.com/en-us/library/system.data.sqlserverce.sqlceengine.compact(vs.80).aspx

sqlceengine engine = new sqlceengine("data source = db.sdf"); engine.compact(null); engine.compact("data source=; password =pass;"); 

by flag, mean field populate on first time. example in web app, have used super admin record flag. query table of super admin find if there record. if there record. not allow open page creating super admin page. if there no such data in app. create table 1 column, , when have set password once, insert value in table. , when ever form requested, check table records.(alternately inset value 0 in column of type tinyint , make 1 when set password )


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -