|
||||||||||
| 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.RC2
public class RC2
Provider of symmetric encryption/decryption operations using RC2 cipher.
| Field Summary | |
|---|---|
static String |
ALGORITHM
Algorithm name. |
| 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 | |
|---|---|
RC2()
Creates a default RC2 symmetric encryption algorithm using CBC mode and PKCS5 padding. |
|
RC2(String mode,
String padding)
Creates a default RC2 symmetric encryption algorithm using the given mode and padding style. |
|
| Method Summary | |
|---|---|
protected AlgorithmParameterSpec |
getAlgorithmParameterSpec()
Gets the algorithm parameter specification for this algorithm. |
static int |
getEffectiveBits(int version)
Gets the number of effective bits for a given RC2Version code. |
int |
getEffectiveKeyBits()
Gets the effective key size in bits. |
static int |
getVersion(int effectiveBits)
Gets the RC2Version code for a given effective bits value. |
void |
setEffectiveKeyBits(int numBits)
Sets the effective key size in bits. |
| Methods inherited from class edu.vt.middleware.crypt.symmetric.SymmetricAlgorithm |
|---|
generateKey, generateKey, generateKey, getAllowedKeyLengths, getChunkSize, getDefaultKeyLength, getMaxKeyLength, getMinKeyLength, getRandomIV, hasIV, isValidKeyLength, 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
| Constructor Detail |
|---|
public RC2()
public RC2(String mode,
String padding)
mode - Cipher mode name.padding - Cipher padding style name.| Method Detail |
|---|
public static int getEffectiveBits(int version)
version - RC2Version code.
public static int getVersion(int effectiveBits)
effectiveBits - Effective bits corresponding to a particular
RC2Version encoded value.
public int getEffectiveKeyBits()
public void setEffectiveKeyBits(int numBits)
numBits - Effective key size in bits; MUST be positive integer.protected AlgorithmParameterSpec getAlgorithmParameterSpec()
getAlgorithmParameterSpec in class SymmetricAlgorithm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||