Hiding Unnecessary Information


Now that you have encrypted the passwords and bank account information, you should do two more encryption-related things to further secure the employee management system: remove the unencrypted password field and the unencrypted bank account field from the Employees table, and protect the password entry field in the logon screen.

Remove the Password and BankAccount fields

The unencrypted Password and BankAccount fields are no longer needed in the EmployeeDatabase.mdb database. In this exercise, you will remove these two fields from the database.

Note

This is an optional exercise. Don’t worry if you don’t have Microsoft Access; the other exercises in this book will still work.

  1. In Microsoft Access XP, open the database EmployeeDatabase.mdb.

  2. In the Database window, select the table Employee and click Design on the Database Window toolbar.

  3. Select the Password field’s row selector, and click Delete Row on the Microsoft Access toolbar. Microsoft Access will then ask you to confirm that you really want to delete the row and all the data it contains. Click Yes.

  4. Select the BankAccount field’s row selector, and again click Delete Row on the Microsoft Access toolbar. Again, click Yes in the dialog box that asks you to confirm the field deletion.

  5. Click the Save button on the toolbar to save the table changes. The new table design should look like the following illustration:

    click to expand

Hide the password entry field

If someone is looking over your shoulder while you’re logging on to the employee management system, that person might be able to read your password as you type it. Windows Forms has the capability of hiding the password as you type it. The following exercise describes the steps necessary to hide the password.

  1. In Visual Studio .NET, open the project CH01_Encryption\EMS\ Start\EMS.sln.

  2. Open the form frmLogin.vb in the Windows Forms designer.

  3. In the form designer, select the password field txtPassword.

  4. In the property browser, find the PasswordChar property, and change the value to *.

    After you complete these steps, the password entry field will appear as a series of asterisks instead of text, as shown here:

    click to expand




Security for Microsoft Visual Basic  .NET
Security for Microsoft Visual Basic .NET
ISBN: 735619190
EAN: N/A
Year: 2003
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net