Enterprise Library encryption application block add application code

Source: Internet
Author: User
Encryption application Program Block Design to support common scenarios of symmetric encryption and hash. Add an application Code And then select the most suitable one. Use the code displayed here along with the scenario or modify it as needed.

Prepare applications

    1. Add a reference to the encrypted application block assembly. In Visual Studio, right-click the project node in the solution browser, and then clickAdd reference. ClickBrowseGoMicrosoft. Practices. enterpriselibrary. Security. cryptography. dllAssembly. Select the assembly, and then clickOK.
    2. Set the reference to the Enterprise Library Common Assembly according to the same steps,Microsoft. Practices. enterpriselibrary. Common. dllAnd reference to the objectbuilder assembly,Microsoft. Practices. enterpriselibrary. objectbuilder. dll.
    3. (Optional) Add the following using Statement (C #) or imports Statement (Visual Basic)Source codeThe top of the file.
C #
Using Microsoft. Practices. enterpriselibrary. Security. cryptography;
Visual Basic
 
Imports Microsoft. Practices. enterpriselibrary. Security. Cryptography

Note:For visual basic projects, you can use the reference pages of the project designer to manage references and import namespaces. To access the reference page, select a project node in the solution browser.ProjectClickAttribute. When the project designer appears, clickReferenceLabel.

4. Next, add the application code.

The scenario in this section demonstrates how to merge these steps into the application.

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.