View Source
Class EncryptionHelper
Inheritance
System.Object
Assembly: Umbraco.Web.Common.dll
Syntax
public class EncryptionHelper
Methods
View Source
CreateEncryptedRouteString(IDataProtectionProvider, String, String, String, Object)
This is used in methods like BeginUmbracoForm and SurfaceAction to generate an encrypted string which gets
submitted in a request for which
Umbraco can decrypt during the routing process in order to delegate the request to a specific MVC Controller.
Declaration
public static string CreateEncryptedRouteString(IDataProtectionProvider dataProtectionProvider, string controllerName, string controllerAction, string area, object additionalRouteVals = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.DataProtection.IDataProtectionProvider |
dataProtectionProvider |
|
System.String |
controllerName |
|
System.String |
controllerAction |
|
System.String |
area |
|
System.Object |
additionalRouteVals |
|
Returns
Type |
Description |
System.String |
|
View Source
Decrypt(String, IDataProtectionProvider)
Declaration
public static string Decrypt(string encryptedString, IDataProtectionProvider dataProtectionProvider)
Parameters
Type |
Name |
Description |
System.String |
encryptedString |
|
Microsoft.AspNetCore.DataProtection.IDataProtectionProvider |
dataProtectionProvider |
|
Returns
Type |
Description |
System.String |
|
View Source
DecryptAndValidateEncryptedRouteString(IDataProtectionProvider, String, out IDictionary<String, String>)
Declaration
public static bool DecryptAndValidateEncryptedRouteString(IDataProtectionProvider dataProtectionProvider, string encryptedString, out IDictionary<string, string> parts)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.DataProtection.IDataProtectionProvider |
dataProtectionProvider |
|
System.String |
encryptedString |
|
IDictionary<System.String, System.String> |
parts |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Encrypt(String, IDataProtectionProvider)
Declaration
public static string Encrypt(string plainString, IDataProtectionProvider dataProtectionProvider)
Parameters
Type |
Name |
Description |
System.String |
plainString |
|
Microsoft.AspNetCore.DataProtection.IDataProtectionProvider |
dataProtectionProvider |
|
Returns
Type |
Description |
System.String |
|