Extending and Modifying the Cryptography Application Block

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.

In its original state, the Cryptography Application Block works well for typical cryptography scenarios. However, there may be times when you have to customize some of the application block's behavior to better suit your application's particular requirements. There are two ways to customize the application block, extension and modification.

You extend the Cryptography Application Block through designated extension points. Typically, these extension points are custom classes, written by you, that implement a particular interface or derive from an abstract class. Because these custom classes exist in your application space, you do not have to modify or rebuild the application block. Instead, you designate your extensions by using configuration settings.

Currently, you can extend the application block by creating new cryptography providers in addition to those provided with the application block. You do this by implementing the interfaces that are included with the application block. To help you use custom providers, you can use the Enterprise Library configuration tools to specify custom hash and symmetric providers. For details, see Extending the Cryptography Application Block.

You modify the Cryptography Application Block by making changes to the application block source code. These changes may or may not require associated configuration changes. Because changes are made to the source code, you must rebuild the application block before the modifications take effect. You must also be prepared to handle support and versioning issues. To learn more, see Modifying the Cryptography Application Block.