DpapiDataProtector.Scope 属性

定义

获取或设置数据保护的范围。

public:
 property System::Security::Cryptography::DataProtectionScope Scope { System::Security::Cryptography::DataProtectionScope get(); void set(System::Security::Cryptography::DataProtectionScope value); };
public System.Security.Cryptography.DataProtectionScope Scope { get; set; }
member this.Scope : System.Security.Cryptography.DataProtectionScope with get, set
Public Property Scope As DataProtectionScope

属性值

一个枚举值指定数据保护的范围(当前用户或本地计算机)。 默认值为 CurrentUser

注解

数据保护会加密磁盘上的数据,以便其他程序无法读取这些数据。 不需要密钥来保护或取消保护数据。 如果将 设置为 ScopeCurrentUser,则只有基于凭据运行的应用程序才能取消保护数据;但是,这意味着基于凭据运行的任何应用程序都可以访问受保护的数据。 如果将 设置为 ScopeLocalMachine,则计算机上的任何完全信任应用程序都可以取消保护、访问和修改数据(如果它知道应用程序名称、主要用途和特定用途)。

适用于