org.bouncycastle.jce.provider.test
Class BlockCipherTest

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

public class BlockCipherTest
extends SimpleTest

basic test class for a 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 BlockCipherTest.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 java.lang.String[] cipherTests2
           
(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 rc564Spec
           
(package private) static javax.crypto.spec.RC5ParameterSpec rc5Spec
           
 
Constructor Summary
BlockCipherTest()
           
 
Method Summary
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
 void test(java.lang.String algorithm, byte[] input, byte[] output)
           
private  void testExceptions()
           
 
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

cipherTests2

static java.lang.String[] cipherTests2

input1

static byte[] input1

input2

static byte[] input2

rc2Spec

static javax.crypto.spec.RC2ParameterSpec rc2Spec

rc5Spec

static javax.crypto.spec.RC5ParameterSpec rc5Spec

rc564Spec

static javax.crypto.spec.RC5ParameterSpec rc564Spec
Constructor Detail

BlockCipherTest

public BlockCipherTest()
Method Detail

getName

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

test

public void test(java.lang.String algorithm,
                 byte[] input,
                 byte[] output)

testExceptions

private void testExceptions()

performTest

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

main

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