private void PasswordGeek_Load(object sender, EventArgs e) { //count-serialize /*Stream streamc = new FileStream("count", FileMode.Create); * BinaryFormatter bformatterc = new BinaryFormatter(); * bformatterc.Serialize(streamc, cnt); * streamc.Close();*/ //code to deserialize the count class1 Stream streamc = File.Open("count", FileMode.Open); BinaryFormatter bformatterc = new BinaryFormatter(); cnt = (Class1)bformatterc.Deserialize(streamc); streamc.Close(); //check if the user is logging in for the first time if (cnt.count == 0) //first time { enter.Text = "Enter Master Password:"******"Master Password:"******"dict", FileMode.Open); BinaryFormatter bformatter = new BinaryFormatter(); d = (Ts_Tree)bformatter.Deserialize(stream); stream.Close(); }
public PasswordGeek() { cr = new Crypography(); d = new Ts_Tree(); ob = new cipher(); // cnt = new Class1(); count = 0; InitializeComponent(); arr = new char[50]; arr[0] = ' '; arr[1] = ','; arr[2] = '-'; arr[3] = ';'; arr[4] = '.'; arr[5] = '\''; arr[6] = '\"'; arr[7] = '?'; arr[8] = '='; arr[9] = '!'; arr[10] = '/'; arr[11] = ':'; arr[12] = '&'; arr[13] = '*'; arr[14] = '%'; arr[15] = '('; arr[16] = '@'; arr[17] = ')'; arr[18] = '#'; arr[19] = '_'; arr[20] = '^'; arr[21] = '`'; arr[22] = '|'; arr[21] = '['; arr[22] = ']'; arr[23] = '\\'; arr[24] = '<'; arr[25] = '>'; arr[26] = '~'; arr[27] = '0'; arr[28] = '1'; arr[29] = '2'; arr[30] = '3'; arr[31] = '4'; arr[32] = '5'; arr[33] = '6'; arr[34] = '7'; arr[35] = '8'; arr[36] = '9'; }