-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
52 lines (44 loc) · 2.65 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Cryptlet</title>
<meta name="author" content="Cyrille Giquello" />
<meta name="description" content="A bookmarklet that perform cryptographic operation" />
<meta name="keywords" content="bookmarklet,cryptography" />
<link rel="stylesheet" type="text/css" media="all" href="style.css" />
</head>
<body>
<h1>Cryptlet</h1>
<p>You can learn about what is a <a href="http://en.wikipedia.org/wiki/Bookmarklet">Bookmarklet</a> on Wikipedia.</p>
<p>
Then, here is the Cryptlet :
<a onclick="return false;" href="javascript:(
function(){
s=document.createElement("script");
s.type="text/javascript";
s.src="./sjcl.js"; /* <- Change the URL here */
document.body.appendChild(s);
s=document.createElement("script");
s.type="text/javascript";
s.src="./cryptlet-essais01.js"; /* <- Change the URL here too */
document.body.appendChild(s);
}());" class="bookmarkletButton">Cryptlet</a>
</p>
<p>The bookmarklet Cryptlet will encrypt selected text in a textarea or an input field, and will decrypt a text outside of a field. It's very usefull for wiki or other kind of CMS to store secret stuff in a public or not so secured place.</p>
<h2>Demo</h2>
<p>To make the demo works you need to copy all files at the same place as this file demo.html. If you want to use it in "real life" you need to change the url in the bookmarklet javascript code to match you website. Happily, you can find <b>an already "in real life" working version</b> installed at <a href="http://comptoir.net">http://comptoir.net</a>.</p>
<form>
Here is the clear text : <br/>
<textarea cols="64">Le mot progrès n'aura aucun sens tant qu'il y aura des enfants malheureux ~ Albert Einstein</textarea>
</form>
<p>And it's encrypted version with the password "toto" :</p>
<p>{"iv":"yhL/2AFGE2PwKda3zqdTuA==","v":1,"iter":1000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"SRStTnVe8Kg=","ct":"We5lu3RqOyiGDa8w7+stWCx5bRUNEvs/KqA/iFfn1Eq7SvdbmoDqYMBYPFWTMVNAn5/OT+3GCFxDxaOpxFQTValL95swIVJDztLNK3Z5OBkqwxGDQ5Qlmvnp8XuSrxPgCm+o6Q=="}</p>
<h2>Reading</h2>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Bookmarklet">Bookmarklet</a> on Wikipedia</li>
<li><a href="http://coding.smashingmagazine.com/2010/05/23/make-your-own-bookmarklets-with-jquery/">Make Your Own Bookmarklets With jQuery</a></li>
<li><a href="http://bitwiseshiftleft.github.io/sjcl/">Stanford Javascript Crypto Library</a></li>
</ul>
</body>
</html>