Share via


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,電腦上的任何完全信任應用程式都可以在知道應用程式名稱、主要用途和特定用途時解除保護、存取和修改數據。

適用於