System.Security.Cryptography.DataProtectionScope Enumeration

Specifies the scope of the data protection to be applied by the ProtectedData.Protect(Byte[], Byte[], DataProtectionScope) method.

Syntax

public enum DataProtectionScope

Remarks

This enumeration is used with the ProtectedData.Protect(Byte[], Byte[], DataProtectionScope) and ProtectedData.Unprotect(Byte[], Byte[], DataProtectionScope) methods to protect data through encryption.

Caution   The DataProtectionScope.LocalMachine enumeration value allows multiple accounts to unprotect data. Use this value only when you trust every account on a computer. For most situations, you should use the DataProtectionScope.CurrentUser value.

Members

Member NameDescription
CurrentUser

The protected data is associated with the current user. Only threads running under the current user context can unprotect the data.

LocalMachine

The protected data is associated with the machine context. Any process running on the computer can unprotect data. This enumeration value is usually used in server-specific applications that run on a server where untrusted users are not allowed access.

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