<PackageReference Include="System.Security.Permissions" Version="5.0.0-preview.1.20120.5" />

DataProtectionPermission

Controls the ability to access encrypted data and memory. This class cannot be inherited.
public DataProtectionPermissionFlags Flags { get; set; }

Gets or sets the data and memory protection flags.

Initializes a new instance of the DataProtectionPermission class with the specified permission state.

Initializes a new instance of the DataProtectionPermission class with the specified permission flags.

public bool IsUnrestricted()

Returns a value indicating whether the current permission is unrestricted.