|
||||||||||
| 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.RC4
public class RC4
Provider of symmetric encryption/decryption operations using RC4 cipher.
| Field Summary | |
|---|---|
static String |
ALGORITHM
Algorithm name. |
static int[] |
KEY_LENGTHS
Available key lengths 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 | |
|---|---|
RC4()
Creates a RC4 symmetric encryption algorithm. |
|
RC4(String mode,
String padding)
Creates a RC4 symmetric encryption algorithm. |
|
| Method Summary | |
|---|---|
int[] |
getAllowedKeyLengths()
Gets an array of key lengths that are acceptable for the cipher algorithm. |
boolean |
isValidKeyLength(int bitLength)
Determines whether the given key size in bits is valid for this symmetric cipher algorithm. |
void |
setIV(byte[] ivBytes)
Sets the encryption initialization vector. |
| Methods inherited from class edu.vt.middleware.crypt.symmetric.SymmetricAlgorithm |
|---|
clone, getAlgorithmParameterSpec, getChunkSize, getMaxKeyLength, getMinKeyLength, getRandomIV, hasIV, newInstance, newInstance, newInstance, newInstance |
| 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 |
|---|
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[] KEY_LENGTHS
| Constructor Detail |
|---|
public RC4()
public RC4(String mode,
String padding)
mode - Cipher mode name -- ignored.padding - Cipher padding style name -- ignored.| Method Detail |
|---|
public void setIV(byte[] ivBytes)
SymmetricAlgorithm.getRandomIV() method to obtain random initialization data of the
appropriate size for the chosen cipher.
IV data is used upon calling either AbstractEncryptionAlgorithm.initEncrypt() or AbstractEncryptionAlgorithm.initDecrypt().
setIV in class SymmetricAlgorithmivBytes - Initialization bytes; in many cases the size of data
should be equal to the cipher block size.public int[] getAllowedKeyLengths()
getAllowedKeyLengths 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 | |||||||||