forked from wouldgo/twofish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (35 loc) · 1013 Bytes
/
index.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
<!DOCTYPE html>
<html ng-app="sound">
<head>
<title>test</title>
</head>
<body>
<script type="text/javascript" src="src/twofish.js"> </script>
<script type="text/javascript">
(function () {
var IV = IV = [
180, 106, 2, 96, //b4 6a 02 60
176, 188, 73, 34, //b0 bc 49 22
181, 235, 7, 133, //b5 eb 07 85
164, 183, 204, 158 //a4 b7 cc 9e;
];
var twF = twofish(IV)
, key = [1, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0]
, ct = [20, 37, 228, 187, //14 25 e4 bb
61, 89, 245, 87, //3d 59 f5 57
52, 175, 38, 58, //34 af 26 3a
96, 9, 121, 1] //60 09 79 01
, cpt = twF.decryptCBC(key, ct)
, probablePt = [94, 160, 128, 0, //5e a0 80 00
0, 1, 6, 1, //00 01 06 01
0, 0, 0, 0, //00 00 00 00
0, 232, 28, 0]; //00 e8 1c 00
console.log('cpt', cpt);
console.log('probablePT', probablePt);
}());
</script>
</body>
</html>