CryptoProvider Class

Provides digital rights management services for encrypting and decrypting protected content.


Namespace:  System.Security.RightsManagement
Assembly:  WindowsBase (in WindowsBase.dll)

public ref class CryptoProvider : IDisposable

The CryptoProvider type exposes the following members.

Public propertyBlockSizeGets the cipher block size, in bytes.
Public propertyBoundGrantsGets a collection listing the rights that passed verification and that are granted to the user.
Public propertyCanDecryptGets a value that indicates whether the user has rights to decrypt.
Public propertyCanEncryptGets a value that indicates whether the user has rights to encrypt.
Public propertyCanMergeBlocksGets a value that indicates whether Encrypt and Decrypt can accept buffers that are different block sizes in length.

Public methodDecryptDecrypts cipher text to clear text.
Public methodDispose()Releases all resources used by the CryptoProvider.
Protected methodDispose(Boolean)Releases the unmanaged resources used by the CryptoProvider and optionally releases the managed resources.
Public methodEncryptEncrypts clear text to cipher text.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeFrees resources and performs internal cleanup before the instance is reclaimed by garbage collection. (Overrides Object::Finalize().)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns 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.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft