View Source
Class EncryptionHelper
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 |
| IDataProtectionProvider |
dataProtectionProvider |
|
| string |
controllerName |
|
| string |
controllerAction |
|
| string |
area |
|
| object |
additionalRouteVals |
|
Returns
View Source
Decrypt(string, IDataProtectionProvider)
Declaration
public static string Decrypt(string encryptedString, IDataProtectionProvider dataProtectionProvider)
Parameters
| Type |
Name |
Description |
| string |
encryptedString |
|
| IDataProtectionProvider |
dataProtectionProvider |
|
Returns
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 |
| IDataProtectionProvider |
dataProtectionProvider |
|
| string |
encryptedString |
|
| IDictionary<string, string> |
parts |
|
Returns
View Source
Encrypt(string, IDataProtectionProvider)
Declaration
public static string Encrypt(string plainString, IDataProtectionProvider dataProtectionProvider)
Parameters
| Type |
Name |
Description |
| string |
plainString |
|
| IDataProtectionProvider |
dataProtectionProvider |
|
Returns