Key Scenarios

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

This topic describes the most common situations that developers must address when providing cryptography functionality in their applications. Each scenario explains the task, describes a real-world situation where such a task might occur, and includes code that demonstrates how to use the Cryptography Application Block to complete the task. The scenarios are the following:

  • Encrypting a Secret. This scenario illustrates how you can use a symmetric algorithm provider to encrypt a secret.
  • Decrypting a Secret. This scenario illustrates how you can use a symmetric algorithm provider to decrypt a secret that has been encrypted.
  • Getting a Hash From Text. This scenario illustrates how you can generate a hash value from data.
  • Check Whether a Hash Value Matches Some Text. This scenario illustrates how you can compare plaintext data with a hash value previously generated from the data, allowing you to verify that the data has not been changed since the hash was originally generated.
Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.