summaryrefslogtreecommitdiff
path: root/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html
Side-by-side diff
Diffstat (limited to 'frontend/gamma/tests/tests/Clipperz/Crypto/AES.html') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/tests/tests/Clipperz/Crypto/AES.html22
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html
index 16f64d0..27a81a4 100644
--- a/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html
+++ b/frontend/gamma/tests/tests/Clipperz/Crypto/AES.html
@@ -1,86 +1,84 @@
<!--
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
-->
<html>
<head>
<title>Clipperz.Crypto.AES_v3 - TEST</title>
<script type="text/javascript" src="../../../../js/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="../../../SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="../../../SimpleTest/test.css">
<script type='text/javascript' src='../../../../js/JSON/json2.js'></script>
<script type='text/javascript' src='../../../../js/Clipperz/YUI/Utils.js'></script>
<script type='text/javascript' src='../../../../js/Clipperz/YUI/DomHelper.js'></script>
<script type='text/javascript' src='../../../../js/Clipperz/Base.js'></script>
<script type='text/javascript' src='../../../../js/Clipperz/ByteArray.js'></script>
<script type='text/javascript' src='../../../../js/Clipperz/Crypto/SHA.js'></script>
<script type='text/javascript' src='../../../../js/Clipperz/Crypto/AES.js'></script>
</head>
<body>
<pre id="test">
<script type="text/javascript">
try {
var block;
var keyValue;
var key;
var encryptedBlock;
var startTime, endTime;
startTime = new Date();
keyValue = new Clipperz.ByteArray("0x00010203050607080a0b0c0d0f10111214151617191a1b1c1e1f202123242526");
key = new Clipperz.Crypto.AES.Key({key:keyValue});
block = new Clipperz.ByteArray("0x834eadfccac7e1b30664b1aba44815ab");
encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues()));
is(encryptedBlock.toHexString(), "0x1946dabf6a03a2a2c3d0b05080aed6fc", "Test 1");
keyValue = new Clipperz.ByteArray("0x28292a2b2d2e2f30323334353738393a3c3d3e3f41424344464748494b4c4d4e");
key = new Clipperz.Crypto.AES.Key({key:keyValue});
block = new Clipperz.ByteArray("0xd9dc4dba3021b05d67c0518f72b62bf1");
encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues()));
is(encryptedBlock.toHexString(), "0x5ed301d747d3cc715445ebdec62f2fb4", "Test 2");
keyValue = new Clipperz.ByteArray("0x50515253555657585a5b5c5d5f60616264656667696a6b6c6e6f707173747576");
key = new Clipperz.Crypto.AES.Key({key:keyValue});
block = new Clipperz.ByteArray("0xa291d86301a4a739f7392173aa3c604c");
encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues()));
is(encryptedBlock.toHexString(), "0x6585c8f43d13a6beab6419fc5935b9d0", "Test 3");
keyValue = new Clipperz.ByteArray("0x78797a7b7d7e7f80828384858788898a8c8d8e8f91929394969798999b9c9d9e");
key = new Clipperz.Crypto.AES.Key({key:keyValue});
block = new Clipperz.ByteArray("0x4264b2696498de4df79788a9f83e9390");
encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues()));
is(encryptedBlock.toHexString(), "0x2a5b56a596680fcc0e05f5e0f151ecae", "Test 4");
keyValue = new Clipperz.ByteArray("0xa0a1a2a3a5a6a7a8aaabacadafb0b1b2b4b5b6b7b9babbbcbebfc0c1c3c4c5c6");
key = new Clipperz.Crypto.AES.Key({key:keyValue});
block = new Clipperz.ByteArray("0xee9932b3721804d5a83ef5949245b6f6");
encryptedBlock = new Clipperz.ByteArray(Clipperz.Crypto.AES.encryptBlock(key, block.arrayValues()));
is(encryptedBlock.toHexString(), "0xf5d6ff414fd2c6181494d20c37f2b8c4", "Test 5");