01: package org.bouncycastle.crypto.test;
02:
03: import org.bouncycastle.crypto.engines.IDEAEngine;
04: import org.bouncycastle.crypto.params.KeyParameter;
05: import org.bouncycastle.util.encoders.Hex;
06: import org.bouncycastle.util.test.SimpleTest;
07:
08: /**
09: */
10: public class IDEATest extends CipherTest {
11: static SimpleTest[] tests = {
12: new BlockCipherVectorTest(
13: 0,
14: new IDEAEngine(),
15: new KeyParameter(Hex
16: .decode("00112233445566778899AABBCCDDEEFF")),
17: "000102030405060708090a0b0c0d0e0f",
18: "ed732271a7b39f475b4b2b6719f194bf"),
19: new BlockCipherVectorTest(
20: 0,
21: new IDEAEngine(),
22: new KeyParameter(Hex
23: .decode("00112233445566778899AABBCCDDEEFF")),
24: "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff",
25: "b8bc6ed5c899265d2bcfad1fc6d4287d") };
26:
27: IDEATest() {
28: super (tests, new IDEAEngine(), new KeyParameter(new byte[32]));
29: }
30:
31: public String getName() {
32: return "IDEA";
33: }
34:
35: public static void main(String[] args) {
36: runTest(new IDEATest());
37: }
38: }
|