gnu.crypto.mode
public class ModeFactory extends Object implements Registry
A Factory to instantiate block cipher modes of operations.
Version: $Revision: 1.10 $
Method Summary | |
---|---|
static IMode | getInstance(String mode, String cipher, int cipherBlockSize) Returns an instance of a block cipher mode of operations given its name and characteristics of the underlying block cipher. |
static IMode | getInstance(String mode, IBlockCipher cipher, int cipherBlockSize) |
static Set | getNames() Returns a java.util.Set of names of mode supported by this Factory. |
Returns an instance of a block cipher mode of operations given its name and characteristics of the underlying block cipher.
Parameters: mode the case-insensitive name of the mode of operations. cipher the case-insensitive name of the block cipher. cipherBlockSize the block size, in bytes, of the underlying cipher.
Returns: an instance of the block cipher algorithm, operating in a given
mode of operations, or null
if none found.
Throws: InternalError if either the mode or the underlying block cipher implementation does not pass its self-test.
Returns a java.util.Set of names of mode supported by this Factory.
Returns: a java.util.Set of mode names (Strings).