|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.crypt.AbstractAlgorithm
edu.vt.middleware.crypt.AbstractEncryptionAlgorithm
edu.vt.middleware.crypt.symmetric.SymmetricAlgorithm
edu.vt.middleware.crypt.symmetric.Blowfish
public class Blowfish
Provider of symmetric encryption/decryption operations using Blowfish cipher.
| Field Summary | |
|---|---|
static String |
ALGORITHM
Algorithm name. |
static int |
DEFAULT_KEY_LENGTH
Default key size for this algorithm in bits. |
static int[] |
KEY_LENGTHS
Available key lengths in bits. |
static int |
MAX_KEY_LENGTH
Maximum key length in bits. |
static int |
MIN_KEY_LENGTH
Minimum key length in bits. |
| Fields inherited from class edu.vt.middleware.crypt.symmetric.SymmetricAlgorithm |
|---|
DEFAULT_MODE, DEFAULT_PADDING, iv, paramSpec |
| Fields inherited from class edu.vt.middleware.crypt.AbstractEncryptionAlgorithm |
|---|
cipher, cipherMode, key, mode, padding |
| Fields inherited from class edu.vt.middleware.crypt.AbstractAlgorithm |
|---|
algorithm, logger, randomByteSize, randomProvider |
| Constructor Summary | |
|---|---|
Blowfish()
Creates a default CAST5 symmetric encryption algorithm using CBC mode and PKCS5 padding. |
|
Blowfish(String mode,
String padding)
Creates a default Blowfish symmetric encryption algorithm using the given mode and padding style. |
|
| Method Summary | |
|---|---|
int[] |
getAllowedKeyLengths()
Gets an array of key lengths that are acceptable for the cipher algorithm. |
int |
getDefaultKeyLength()
Gets the default key length for this algorithm. |
int |
getMaxKeyLength()
Gets the maximum key length for this algorithm. |
int |
getMinKeyLength()
Gets the minimum key length for this algorithm. |
boolean |
isValidKeyLength(int bitLength)
Determines whether the given key size in bits is valid for this symmetric cipher algorithm. |
| Methods inherited from class edu.vt.middleware.crypt.symmetric.SymmetricAlgorithm |
|---|
generateKey, generateKey, generateKey, getAlgorithmParameterSpec, getChunkSize, getRandomIV, hasIV, newInstance, newInstance, newInstance, newInstance, setIV |
| Methods inherited from class edu.vt.middleware.crypt.AbstractEncryptionAlgorithm |
|---|
crypt, crypt, decrypt, decrypt, decrypt, encrypt, encrypt, encrypt, getBlockSize, getCipherMode, getMode, getPadding, init, initCipher, initDecrypt, initEncrypt, setKey, toString |
| Methods inherited from class edu.vt.middleware.crypt.AbstractAlgorithm |
|---|
getAlgorithm, getRandomData, setRandomProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.vt.middleware.crypt.Algorithm |
|---|
getAlgorithm, getRandomData, setRandomProvider |
| Field Detail |
|---|
public static final String ALGORITHM
public static final int MIN_KEY_LENGTH
public static final int MAX_KEY_LENGTH
public static final int DEFAULT_KEY_LENGTH
public static final int[] KEY_LENGTHS
| Constructor Detail |
|---|
public Blowfish()
public Blowfish(String mode,
String padding)
mode - Cipher mode name.padding - Cipher padding style name.| Method Detail |
|---|
public int getDefaultKeyLength()
getDefaultKeyLength in class SymmetricAlgorithmpublic int[] getAllowedKeyLengths()
getAllowedKeyLengths in class SymmetricAlgorithmpublic int getMinKeyLength()
getMinKeyLength in class SymmetricAlgorithmpublic int getMaxKeyLength()
getMaxKeyLength in class SymmetricAlgorithmpublic boolean isValidKeyLength(int bitLength)
isValidKeyLength in class SymmetricAlgorithmbitLength - Key size in bits.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||