org.bouncycastle.crypto.test
Class ModeReinitTest
java.lang.Object
org.bouncycastle.util.test.SimpleTest
org.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.
| 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 |
ModeReinitTest
public ModeReinitTest()
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)