This documentation is archived and is not being maintained.
CryptoProvider Class
Visual Studio 2010
Provides digital rights management services for encrypting and decrypting protected content.
Assembly: WindowsBase (in WindowsBase.dll)
The CryptoProvider type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | BlockSize | Gets the cipher block size, in bytes. |
![]() | BoundGrants | Gets a collection listing the rights that passed verification and that are granted to the user. |
![]() | CanDecrypt | Gets a value that indicates whether the user has rights to decrypt. |
![]() | CanEncrypt | Gets a value that indicates whether the user has rights to encrypt. |
![]() | CanMergeBlocks | Gets a value that indicates whether Encrypt and Decrypt can accept buffers that are different block sizes in length. |
| Name | Description | |
|---|---|---|
![]() | Decrypt | Decrypts cipher text to clear text. |
![]() | Dispose() | Releases all resources used by the CryptoProvider. |
![]() | Dispose(Boolean) | Releases the unmanaged resources used by the CryptoProvider and optionally releases the managed resources. |
![]() | Encrypt | Encrypts clear text to cipher text. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Frees resources and performs internal cleanup before the instance is reclaimed by garbage collection. (Overrides Object::Finalize().) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
CryptoProvider is created as a result of the Bind method when binding a rights managed UseLicense to a SecureEnvironment.
As with other System.Security.RightsManagement types, CryptoProvider is only usable in full trust applications.
The following example shows how to use the CryptoProvider class to create an EncryptedPackageEnvelope.
Windows 7, Windows Vista SP1 or later, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
