You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Encrypted HTML content rendering support (CSHTML)
42
-
43
-
####1.1
44
-
- jCryption version 3.1.0
45
-
- secure form data loading ( on CSHTML )
46
-
47
-
####1.0.1
48
-
- now works with jquery.validate
49
-
50
-
####1.0
51
-
52
24
Suggestions for original jCryption
53
25
---
54
26
- AESKey may be only one per page over multiple forms on the same page, since server-side holds only one key in the session state ( with the implementation of PHP ).
@@ -57,25 +29,33 @@ Suggestions for original jCryption
57
29
- Handle form's submit event (not click). 'click' event occurs before form validation for example.
58
30
- if AES key is attached to encrypted form post with 'jCryption'? This makes form post 'session' independent and allows form re-post by pressing F5.
59
31
32
+
jquery.jcryption.x.x.x.mod.js is the modified version which solves the problems above. mod version is also needed to work with MVC properly.
33
+
60
34
Dependency
61
35
---
62
36
- jQuery ( on which jCryption depends ) http://jquery.com/
63
37
- jCryption 3.0.1 or later http://www.jcryption.org/
64
38
- ASP.NET 4.0 or later
65
-
- ( ASP.NET WebPages 2.0 or later )
39
+
- ASP.NET WebPages 2.0 or later (option)
40
+
- ASP.NET MVC 4 or later (option)
66
41
67
42
Installation
68
43
---
69
-
70
-
- App_Code/jCryption.cs
71
-
- Scripts/jquery.jcryption.3.1.0.js
44
+
ASP.NET or ASP.NET WebPages
45
+
- App_Code/jCryption.cs (ASP.NET and WebPages)
46
+
- Scripts/jquery.jcryption.3.1.0.js ( or mod version )
47
+
48
+
ASP.NET MVC 4 or later
49
+
- Filters/jCryption.cs [compile]
50
+
- Filters/jCryption.Mvc.cs [compile]
51
+
- Scripts/jquery.jcryption.3.1.0.mod.js
72
52
73
53
74
54
Integration Examples
75
55
---
76
56
77
57
78
-
###ASPX
58
+
##ASPX
79
59
Make ASPX page inherit jCryption.SecurePage. SecurePage handles the negotiations with jCryption client javascript library. Javascript initialization should be placed so that 'getKeysURL' and 'handshakeURL' can access the Page.
80
60
81
61
```aspx
@@ -95,9 +75,37 @@ Make ASPX page inherit jCryption.SecurePage. SecurePage handles the negotiations
95
75
</head>
96
76
......
97
77
78
+
```
79
+
##ASP.NET MVC
80
+
Place both `jCryption.cs` and `jCryption.Mvc.cs` to be compiled in the project. They can be placed in any folder. Handshake and decryption are processed through jCryptionHandlerAttribute.
81
+
82
+
- Decorate action methods that are potentially responsible to handle jCryption handshake and decryption with `[jCryptionHandler]` . The following example shows 2 Login methods must have `[jCryptionHandler]` attribute.
83
+
84
+
```cs
85
+
// GET: /Account/Login
86
+
[AllowAnonymous]
87
+
[jCryptionHandler]
88
+
publicActionResultLogin(stringreturnUrl)
89
+
{ . . . }
90
+
91
+
// POST: /Account/Login
92
+
[HttpPost]
93
+
[AllowAnonymous]
94
+
[jCryptionHandler]
95
+
[ValidateAntiForgeryToken(Order=0)] // to make sure this action comes after jCryptionHandler
0 commit comments