19 instantiations of Purpose
System.Web (19)
Security\Cryptography\MachineKeyDataProtectorFactory.cs (1)
16private static readonly Purpose _creationTestingPurpose = new Purpose("test-1", "test-2", "test-3");
Security\Cryptography\MachineKeyMasterKeyProvider.cs (1)
145Purpose purpose = new Purpose(AUTOGEN_KEYDERIVATION_PRIMARYPURPOSE, specificPurposes.ToArray());
Security\Cryptography\Purpose.cs (17)
32public static readonly Purpose AnonymousIdentificationModule_Ticket = new Purpose("AnonymousIdentificationModule.Ticket"); 33public static readonly Purpose AssemblyResourceLoader_WebResourceUrl = new Purpose("AssemblyResourceLoader.WebResourceUrl"); 34public static readonly Purpose FormsAuthentication_Ticket = new Purpose("FormsAuthentication.Ticket"); 35public static readonly Purpose WebForms_Page_PreviousPageID = new Purpose("WebForms.Page.PreviousPageID"); 36public static readonly Purpose RolePrincipal_Ticket = new Purpose("RolePrincipal.Ticket"); 37public static readonly Purpose ScriptResourceHandler_ScriptResourceUrl = new Purpose("ScriptResourceHandler.ScriptResourceUrl"); 40public static readonly Purpose WebForms_ClientScriptManager_EventValidation = new Purpose("WebForms.ClientScriptManager.EventValidation"); 41public static readonly Purpose WebForms_DetailsView_KeyTable = new Purpose("WebForms.DetailsView.KeyTable"); 42public static readonly Purpose WebForms_GridView_DataKeys = new Purpose("WebForms.GridView.DataKeys"); 43public static readonly Purpose WebForms_GridView_SortExpression = new Purpose("WebForms.GridView.SortExpression"); 44public static readonly Purpose WebForms_HiddenFieldPageStatePersister_ClientState = new Purpose("WebForms.HiddenFieldPageStatePersister.ClientState"); 45public static readonly Purpose WebForms_ScriptManager_HistoryState = new Purpose("WebForms.ScriptManager.HistoryState"); 46public static readonly Purpose WebForms_SessionPageStatePersister_ClientState = new Purpose("WebForms.SessionPageStatePersister.ClientState"); 49public static readonly Purpose User_MachineKey_Protect = new Purpose("User.MachineKey.Protect"); // used by the MachineKey static class Protect / Unprotect methods 50public static readonly Purpose User_ObjectStateFormatter_Serialize = new Purpose("User.ObjectStateFormatter.Serialize"); // used by ObjectStateFormatter.Serialize() if called manually 90return new Purpose(PrimaryPurpose, newSpecificPurposes); 105return new Purpose(PrimaryPurpose, newSpecificPurposes);
80 references to Purpose
System.Web (80)
Handlers\AssemblyResourceLoader.cs (2)
117string encryptedData = Page.EncryptString(assemblyName + "|" + resourceName, Purpose.AssemblyResourceLoader_WebResourceUrl); 522decryptedData = Page.DecryptString(encryptedData, Purpose.AssemblyResourceLoader_WebResourceUrl);
Security\AnonymousIdentificationModule.cs (2)
351return CookieProtectionHelper.Encode(s_Protection, buffer, Purpose.AnonymousIdentificationModule_Ticket); 361byte [] bBlob = CookieProtectionHelper.Decode(s_Protection, data, Purpose.AnonymousIdentificationModule_Ticket);
Security\CookieProtection.cs (2)
22internal static string Encode (CookieProtection cookieProtection, byte [] buf, Purpose purpose) 69internal static byte[] Decode (CookieProtection cookieProtection, string data, Purpose purpose)
Security\Cryptography\AspNetCryptoServiceProvider.cs (3)
54public ICryptoService GetCryptoService(Purpose purpose, CryptoServiceOptions options = CryptoServiceOptions.None) { 69private DataProtectorCryptoService GetDataProtectorCryptoService(Purpose purpose) { 74private NetFXCryptoService GetNetFXCryptoService(Purpose purpose, CryptoServiceOptions options) {
Security\Cryptography\DataProtectorCryptoService.cs (2)
16private readonly Purpose _purpose; 18public DataProtectorCryptoService(IDataProtectorFactory dataProtectorFactory, Purpose purpose) {
Security\Cryptography\ICryptoServiceProvider.cs (1)
15ICryptoService GetCryptoService(Purpose purpose, CryptoServiceOptions options = CryptoServiceOptions.None);
Security\Cryptography\IDataProtectorFactory.cs (1)
15DataProtector GetDataProtector(Purpose purpose);
Security\Cryptography\KeyDerivationFunction.cs (1)
13internal delegate CryptographicKey KeyDerivationFunction(CryptographicKey keyDerivationKey, Purpose purpose);
Security\Cryptography\MachineKeyDataProtectorFactory.cs (5)
16private static readonly Purpose _creationTestingPurpose = new Purpose("test-1", "test-2", "test-3"); 18private Func<Purpose, DataProtector> _dataProtectorFactory; 25public DataProtector GetDataProtector(Purpose purpose) { 32private Func<Purpose, DataProtector> GetDataProtectorFactory() { 36Func<Purpose, DataProtector> factory = purpose => {
Security\Cryptography\MachineKeyMasterKeyProvider.cs (1)
145Purpose purpose = new Purpose(AUTOGEN_KEYDERIVATION_PRIMARYPURPOSE, specificPurposes.ToArray());
Security\Cryptography\Purpose.cs (17)
32public static readonly Purpose AnonymousIdentificationModule_Ticket = new Purpose("AnonymousIdentificationModule.Ticket"); 33public static readonly Purpose AssemblyResourceLoader_WebResourceUrl = new Purpose("AssemblyResourceLoader.WebResourceUrl"); 34public static readonly Purpose FormsAuthentication_Ticket = new Purpose("FormsAuthentication.Ticket"); 35public static readonly Purpose WebForms_Page_PreviousPageID = new Purpose("WebForms.Page.PreviousPageID"); 36public static readonly Purpose RolePrincipal_Ticket = new Purpose("RolePrincipal.Ticket"); 37public static readonly Purpose ScriptResourceHandler_ScriptResourceUrl = new Purpose("ScriptResourceHandler.ScriptResourceUrl"); 40public static readonly Purpose WebForms_ClientScriptManager_EventValidation = new Purpose("WebForms.ClientScriptManager.EventValidation"); 41public static readonly Purpose WebForms_DetailsView_KeyTable = new Purpose("WebForms.DetailsView.KeyTable"); 42public static readonly Purpose WebForms_GridView_DataKeys = new Purpose("WebForms.GridView.DataKeys"); 43public static readonly Purpose WebForms_GridView_SortExpression = new Purpose("WebForms.GridView.SortExpression"); 44public static readonly Purpose WebForms_HiddenFieldPageStatePersister_ClientState = new Purpose("WebForms.HiddenFieldPageStatePersister.ClientState"); 45public static readonly Purpose WebForms_ScriptManager_HistoryState = new Purpose("WebForms.ScriptManager.HistoryState"); 46public static readonly Purpose WebForms_SessionPageStatePersister_ClientState = new Purpose("WebForms.SessionPageStatePersister.ClientState"); 49public static readonly Purpose User_MachineKey_Protect = new Purpose("User.MachineKey.Protect"); // used by the MachineKey static class Protect / Unprotect methods 50public static readonly Purpose User_ObjectStateFormatter_Serialize = new Purpose("User.ObjectStateFormatter.Serialize"); // used by ObjectStateFormatter.Serialize() if called manually 85internal Purpose AppendSpecificPurpose(string specificPurpose) { 95internal Purpose AppendSpecificPurposes(IList<string> specificPurposes) {
Security\Cryptography\SP800_108.cs (1)
41public static CryptographicKey DeriveKey(CryptographicKey keyDerivationKey, Purpose purpose) {
Security\FormsAuthentication.cs (2)
155ICryptoService cryptoService = AspNetCryptoServiceProvider.Instance.GetCryptoService(Purpose.FormsAuthentication_Ticket); 256ICryptoService cryptoService = AspNetCryptoServiceProvider.Instance.GetCryptoService(Purpose.FormsAuthentication_Ticket);
Security\MachineKey.cs (4)
175Purpose derivedPurpose = Purpose.User_MachineKey_Protect.AppendSpecificPurposes(purposes); 209Purpose derivedPurpose = Purpose.User_MachineKey_Protect.AppendSpecificPurposes(purposes);
Security\RolePrincipal.cs (2)
107byte[] bTicket = CookieProtectionHelper.Decode(Roles.CookieProtectionValue, encryptedTicket, Purpose.RolePrincipal_Ticket); 269return CookieProtectionHelper.Encode(Roles.CookieProtectionValue, buf, Purpose.RolePrincipal_Ticket);
UI\ClientScriptManager.cs (2)
124return formatter.Serialize(eventValidationStoreObject, Purpose.WebForms_ClientScriptManager_EventValidation); 205eventValidationField = formatter.Deserialize(unsafeField, Purpose.WebForms_ClientScriptManager_EventValidation);
UI\HiddenFieldPageStatePersister.cs (2)
32Pair combinedState = (Pair)Util.DeserializeWithAssert(StateFormatter2, viewStateString, Purpose.WebForms_HiddenFieldPageStatePersister_ClientState); 53Page.ClientState = Util.SerializeWithAssert(StateFormatter2, new Pair(ViewState, ControlState), Purpose.WebForms_HiddenFieldPageStatePersister_ClientState);
UI\IStateFormatter2.cs (2)
17object Deserialize(string serializedState, Purpose purpose); 19string Serialize(object state, Purpose purpose);
UI\ObjectStateFormatter.cs (8)
362return Deserialize(inputString, Purpose.User_ObjectStateFormatter_Serialize); 365private object Deserialize(string inputString, Purpose purpose) { 379Purpose derivedPurpose = purpose.AppendSpecificPurposes(GetSpecificPurposes()); 763return Serialize(stateGraph, Purpose.User_ObjectStateFormatter_Serialize); 766private string Serialize(object stateGraph, Purpose purpose) { 784Purpose derivedPurpose = purpose.AppendSpecificPurposes(GetSpecificPurposes()); 1255object IStateFormatter2.Deserialize(string serializedState, Purpose purpose) { 1259string IStateFormatter2.Serialize(object state, Purpose purpose) {
UI\Page.cs (5)
1832internal static string DecryptString(string s, Purpose purpose) { 2000internal static string EncryptString(string s, Purpose purpose) { 2428string path = EncryptString(Request.CurrentExecutionFilePath, Purpose.WebForms_Page_PreviousPageID); 4705DecryptString(_requestValueCollection[previousPageID], Purpose.WebForms_Page_PreviousPageID)); 5001DecryptString(_requestValueCollection[previousPageID], Purpose.WebForms_Page_PreviousPageID));
UI\PageAdapter.cs (1)
251writer.Write("=" + Page.EncryptString(Page.Request.CurrentExecutionFilePath, Purpose.WebForms_Page_PreviousPageID));
UI\SessionPageStatePersister.cs (2)
49Pair combinedState = (Pair)Util.DeserializeWithAssert(StateFormatter2, combinedSerializedStateString, Purpose.WebForms_SessionPageStatePersister_ClientState); 139Page.ClientState = Util.SerializeWithAssert(StateFormatter2, new Pair(requiresControlStateInSession, clientData), Purpose.WebForms_SessionPageStatePersister_ClientState);
UI\Util.cs (2)
51internal static string SerializeWithAssert(IStateFormatter2 formatter, object stateGraph, Purpose purpose) { 57internal static object DeserializeWithAssert(IStateFormatter2 formatter, string serializedState, Purpose purpose) {
UI\WebControls\DetailsView.cs (2)
2262string dataKeyString = formatter.Serialize(dataKeyState, Purpose.WebForms_DetailsView_KeyTable); 2877ArrayList oldDataKeyState = formatter.Deserialize(oldDataKeyString, Purpose.WebForms_DetailsView_KeyTable) as ArrayList;
UI\WebControls\GridView.cs (8)
1884return "\"" + PageIndex + "|" + (int)sortDirection + "|" + StateFormatter.Serialize(sortExpression, Purpose.WebForms_GridView_SortExpression) + "|\""; 1892_sortExpressionSerialized = StateFormatter.Serialize(SortExpression, Purpose.WebForms_GridView_SortExpression); 2782string dataKeysString = formatter.Serialize(SaveDataKeysState(), Purpose.WebForms_GridView_DataKeys); 2783string sortExpressionString = formatter.Serialize(SortExpression, Purpose.WebForms_GridView_SortExpression); 3520oldSortExpression = (string)StateFormatter.Deserialize(sortExpressionSerialized, Purpose.WebForms_GridView_SortExpression); 3523dataKeys = StateFormatter.Deserialize(dataKeysSerialized, Purpose.WebForms_GridView_DataKeys); 3734string sortExpressionSerialized = formatter.Serialize(SortExpression, Purpose.WebForms_GridView_SortExpression); 4140string sortExpression = (string)formatter.Deserialize(sortExpressionSerialized, Purpose.WebForms_GridView_SortExpression);