Bouncy Castle Cryptography Library 1.87

org.bouncycastle.crypto.test
Class ModeReinitTest

java.lang.Object
  extended byorg.bouncycastle.util.test.SimpleTest
      extended byorg.bouncycastle.crypto.test.ModeReinitTest
All Implemented Interfaces:
Test

public class ModeReinitTest
extends SimpleTest

Re-initialisation of CBC and CFB with partial parameters: a key without an IV, an IV without a key, or null.

CBC and CFB differ here. CBC goes back to a zero IV when re-initialised without one, and cannot change direction without a key. CFB keeps the IV from its last init, and can change direction without a key, as its underlying cipher is only ever used to encrypt.

Expected values come from a reference built on the raw block cipher, not from the mode under test.


Nested Class Summary
 
Nested classes inherited from class org.bouncycastle.util.test.SimpleTest
SimpleTest.TestExceptionOperation
 
Constructor Summary
ModeReinitTest()
           
 
Method Summary
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, areEqual, areEqual, fail, fail, fail, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isTrue, isTrue, perform, runTest, runTest, runTests, runTests, testException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModeReinitTest

public ModeReinitTest()
Method Detail

getName

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

performTest

public void performTest()
                 throws java.lang.Exception
Specified by:
performTest in class SimpleTest
Throws:
java.lang.Exception

main

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

Bouncy Castle Cryptography Library 1.87