<?xml version="1.0" encoding="utf-8"?> <Type Name="DataProtectionScope" FullName="System.Security.Cryptography.DataProtectionScope"> <TypeSignature Language="C#" Value="public enum DataProtectionScope" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed DataProtectionScope extends System.Enum" /> <AssemblyInfo> <AssemblyName>System.Security</AssemblyName> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>System.Enum</BaseTypeName> </Base> <Docs> <since version=".NET 2.0" /> <remarks> <attribution license="cc4" from="Microsoft" modified="false" /> <para>This enumeration is used with the <see cref="M:System.Security.Cryptography.ProtectedData.Protect(System.Byte[],System.Byte[],System.Security.Cryptography.DataProtectionScope)" /> and <see cref="M:System.Security.Cryptography.ProtectedData.Unprotect(System.Byte[],System.Byte[],System.Security.Cryptography.DataProtectionScope)" /> methods to protect data through encryption.</para> <para>Caution The <see cref="F:System.Security.Cryptography.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 <see cref="F:System.Security.Cryptography.DataProtectionScope.CurrentUser" /> value.</para> </remarks> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>Specifies the scope of the data protection to be applied by the <see cref="M:System.Security.Cryptography.ProtectedData.Protect(System.Byte[],System.Byte[],System.Security.Cryptography.DataProtectionScope)" /> method.</para> </summary> </Docs> <Members> <Member MemberName="CurrentUser"> <MemberSignature Language="C#" Value="CurrentUser" /> <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Security.Cryptography.DataProtectionScope CurrentUser = int32(0)" /> <MemberType>Field</MemberType> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Security.Cryptography.DataProtectionScope</ReturnType> </ReturnValue> <Docs> <since version=".NET 2.0" /> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>The protected data is associated with the current user. Only threads running under the current user context can unprotect the data.</para> </summary> </Docs> </Member> <Member MemberName="LocalMachine"> <MemberSignature Language="C#" Value="LocalMachine" /> <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Security.Cryptography.DataProtectionScope LocalMachine = int32(1)" /> <MemberType>Field</MemberType> <AssemblyInfo> <AssemblyVersion>2.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Security.Cryptography.DataProtectionScope</ReturnType> </ReturnValue> <Docs> <since version=".NET 2.0" /> <summary> <attribution license="cc4" from="Microsoft" modified="false" /> <para>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.</para> </summary> </Docs> </Member> </Members> </Type>