System.Security.Cryptography.ProtectedMemory Class

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

See Also: ProtectedMemory Members

Syntax

public sealed class ProtectedMemory

Remarks

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, ProtectedMemory.Protect(Byte[], MemoryProtectionScope) and ProtectedMemory.Unprotect(Byte[], MemoryProtectionScope). These two methods can be used to encrypt and decrypt data in memory.

Requirements

Namespace: System.Security.Cryptography
Assembly: System.Security (in System.Security.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0