System.Security 2.0.0.0 4.0.0.0 System.Object

This class provides access to the Data Protection API (DPAPI) available in the Windows XP and later operating systems. This is a service that is provided by the operating system and does not require additional libraries. It provides encryption for sensitive data in memory.

The class consists of two wrappers for the unmanaged DPAPI, and . These two methods can be used to encrypt and decrypt data in memory.

Provides methods for protecting and unprotecting memory. This class cannot be inherited.

- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  This method can be used to protect data in memory. Note that the method does not make a copy of the data, but encrypts the byte array in place. The parameter must be 16 bytes in length or a multiple of 16 bytes.

  Support for this method is available in the Windows XP and later operating systems.

  Protects the specified data.

  The byte array containing data in memory to protect. The array must be a multiple of 16 bytes. One of the enumeration values that specifies the scope of memory protection.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  This method can be used to unencrypt data in memory that was encrypted using the method.

  Support for this method is available in the Windows XP and later operating systems.

  Unprotects data in memory that was protected using the method.

  The byte array in memory to unencrypt. One of the enumeration values that specifies the scope of memory protection.