Επεξεργασία

Κοινή χρήση μέσω


DataProtectionPermissionFlags Enum

Definition

Caution

Code Access Security is not supported or honored by the runtime.

Specifies the access permissions for encrypting data and memory.

This enumeration supports a bitwise combination of its member values.

public enum class DataProtectionPermissionFlags
[System.Flags]
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum DataProtectionPermissionFlags
[System.Flags]
[System.Serializable]
public enum DataProtectionPermissionFlags
[System.Flags]
public enum DataProtectionPermissionFlags
[<System.Flags>]
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type DataProtectionPermissionFlags = 
[<System.Flags>]
[<System.Serializable>]
type DataProtectionPermissionFlags = 
[<System.Flags>]
type DataProtectionPermissionFlags = 
Public Enum DataProtectionPermissionFlags
Inheritance
DataProtectionPermissionFlags
Attributes

Fields

Name Value Description
NoFlags 0

No protection abilities.

ProtectData 1

The ability to encrypt data.

UnprotectData 2

The ability to unencrypt data.

ProtectMemory 4

The ability to encrypt memory.

UnprotectMemory 8

The ability to unencrypt memory.

AllFlags 15

The ability to encrypt data, encrypt memory, unencrypt data, and unencrypt memory.

Remarks

Caution

Code Access Security (CAS) has been deprecated across all versions of .NET Framework and .NET. Recent versions of .NET do not honor CAS annotations and produce errors if CAS-related APIs are used. Developers should seek alternative means of accomplishing security tasks.

This enumeration is used by the DataProtectionPermission and DataProtectionPermissionAttribute classes to protect access to encrypted data and memory using the ProtectedData and ProtectedMemory classes.

Caution

Many of these flags can have powerful effects and should be granted only to highly trusted code.

Applies to