Enterprise Library 2.0 hands on Lab translation (15): Cryptographic Application Block (ii)

Source: Internet
Author: User
Tags config

Exercise 2: Encrypt a password with a hash

In this exercise you will use hashing to encrypt passwords and store them in an XML file.

First step

To hit the BugSmak.sln project, the default installation path should be C:\Program Files\Microsoft Enterprise Library January Ex02\begin, and compiled.

Second Step review application

1. Select Debug | The Start without Debugging menu command runs the application.

2. The application allows you to manage user names and passwords in an XML file. Add a new user Elmo, click on the New User button, enter the username Elmo, leave the default password P@ssw0rd, and click the OK button.

3. Click the Save button to save the changes made to the Userstore.config file.

4. Closes the application.

5. In Solution Manager, open the Userstore.config file, and you can see that the password exists in plaintext.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <configSections>
  <section name="userStore"
   type="UserStore.Configuration.UserSettings, UserStore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
 </configSections>
 <userStore>
  <users>
   <add name="Elmo" password="P@ssw0rd" />
   <add name="Zoe" password="P@ssw0rd" />
  </users>
 </userStore>
</configuration>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.