Source code: cryptix/jce/test/TestRC2.java
1 /* $Id: TestRC2.java,v 1.5 2000/07/28 20:06:11 gelderen Exp $
2 *
3 * Copyright (C) 1995-1999 The Cryptix Foundation Limited.
4 * All rights reserved.
5 *
6 * Use, modification, copying and distribution of this software is subject
7 * the terms and conditions of the Cryptix General Licence. You should have
8 * received a copy of the Cryptix General Licence along with this library;
9 * if not, you can download a copy from http://www.cryptix.org/ .
10 */
11 package cryptix.jce.test;
12
13
14 final class TestRC2
15 extends CipherTest
16 {
17 private static final String NAME="RC2";
18
19 //
20 // Values taken from
21 // - On the Design and Security of RC2, Knudsen et al.
22 //
23 private static final String[][] TEST_VALUES =
24 {
25 {"88bca90e90875a7f0f79c384627bafb2",
26 "0000000000000000","2269552ab0f85ca6"},
27 {"ffffffffffffffff", "ffffffffffffffff","278b27e42e2f0d49"},
28 {"3000000000000000", "1000000000000001","30649edf9be7d2c2"},
29 {"3000000000000000", "1000000000000001","30649edf9be7d2c2"}
30 };
31
32
33 protected TestRC2()
34 {
35 super(NAME);
36 }
37
38
39 protected void doIt()
40 throws Exception
41 {
42 testCipher(TEST_VALUES);
43 }
44 }