Package org.cryptacular.spec
Class KeyedBlockCipherSpec
java.lang.Object
org.cryptacular.spec.BufferedBlockCipherSpec
org.cryptacular.spec.KeyedBlockCipherSpec
- All Implemented Interfaces:
Serializable,Spec<org.bouncycastle.crypto.BufferedBlockCipher>
Describes a block cipher algorithm with a known key size.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intKey length in bits.private static final longserialVersionUID.Fields inherited from class org.cryptacular.spec.BufferedBlockCipherSpec
FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionKeyedBlockCipherSpec(String algName, String cipherMode, String cipherPadding, int keyBitLength) Creates a new instance from the given cipher specifications. -
Method Summary
Methods inherited from class org.cryptacular.spec.BufferedBlockCipherSpec
getAlgorithm, getBlockCipherSpec, getMode, getPadding, newInstance, parse, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDserialVersionUID.- See Also:
-
keyLength
private final int keyLengthKey length in bits.
-
-
Constructor Details
-
KeyedBlockCipherSpec
public KeyedBlockCipherSpec(String algName, String cipherMode, String cipherPadding, int keyBitLength) Creates a new instance from the given cipher specifications.- Parameters:
algName- Cipher algorithm name.cipherMode- Cipher mode.cipherPadding- Cipher padding scheme algorithm.keyBitLength- Key length in bits.
-
-
Method Details
-
getKeyLength
public int getKeyLength()Gets the cipher key length in bits.- Returns:
- Key length in bits.
-