org.bouncycastle.jce.provider.test
Class DESedeTest

java.lang.Object
  extended by org.bouncycastle.util.test.SimpleTest
      extended by org.bouncycastle.jce.provider.test.DESedeTest
All Implemented Interfaces:
Test

public class DESedeTest
extends SimpleTest

basic test class for key generation for a DES-EDE block cipher, basically this just exercises the provider, and makes sure we are behaving sensibly, correctness of the implementation is shown in the lightweight test classes.


Nested Class Summary
private  class DESedeTest.FixedSecureRandom
          a fake random number generator - we just want to make sure the random numbers aren't random so that we get the same output, while still getting to test the key generation facilities.
 
Field Summary
(package private) static java.lang.String[] cipherTests1
           
(package private) static byte[] input1
           
(package private) static byte[] input2
           
(package private) static javax.crypto.spec.RC2ParameterSpec rc2Spec
           
(package private) static javax.crypto.spec.RC5ParameterSpec rc5Spec
           
 
Constructor Summary
DESedeTest()
           
 
Method Summary
private  boolean equalArray(byte[] a, byte[] b)
           
private  boolean equalArray(byte[] a, byte[] b, int length)
           
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
 void test(int strength, byte[] input, byte[] output)
           
private  void wrapTest(int id, byte[] kek, byte[] iv, byte[] in, byte[] out)
           
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, fail, fail, fail, perform, runTest, runTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cipherTests1

static java.lang.String[] cipherTests1

input1

static byte[] input1

input2

static byte[] input2

rc2Spec

static javax.crypto.spec.RC2ParameterSpec rc2Spec

rc5Spec

static javax.crypto.spec.RC5ParameterSpec rc5Spec
Constructor Detail

DESedeTest

public DESedeTest()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Test
Specified by:
getName in class SimpleTest

equalArray

private boolean equalArray(byte[] a,
                           byte[] b)

equalArray

private boolean equalArray(byte[] a,
                           byte[] b,
                           int length)

wrapTest

private void wrapTest(int id,
                      byte[] kek,
                      byte[] iv,
                      byte[] in,
                      byte[] out)

test

public void test(int strength,
                 byte[] input,
                 byte[] output)

performTest

public void performTest()
Specified by:
performTest in class SimpleTest

main

public static void main(java.lang.String[] args)