|
DBAbstract API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ro.raducora.utils.encryption.RC4
This class implements the RC4 (TM) stream cipher.
| Constructor Summary | |
RC4()
Constructs an RC4 cipher object, in the UNINITIALIZED state. |
|
| Method Summary | |
java.lang.Object |
clone()
Always throws a CloneNotSupportedException (cloning of ciphers is not supported for security reasons). |
int |
engineBlockSize()
SPI : Returns the length of an input block, in bytes. |
void |
engineInitDecrypt(byte[] key)
SPI : Initializes this cipher for decryption, using the specified key. |
void |
engineInitEncrypt(byte[] key)
SPI : Initializes this cipher for encryption, using the specified key. |
protected int |
engineUpdate(byte[] in,
int inOffset,
int inLen,
byte[] out,
int outOffset)
SPI : This is the main engine method for updating data. |
boolean |
getState()
|
void |
rc4(byte[] in,
int inOffset,
int inLen,
byte[] out,
int outOffset)
RC4 encryption/decryption. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RC4()
| Method Detail |
public boolean getState()
public final java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic int engineBlockSize()
public void engineInitEncrypt(byte[] key)
throws java.security.InvalidKeyException
key - the key to use for encryption.
java.security.InvalidKeyException - if the key is invalid.
public void engineInitDecrypt(byte[] key)
throws java.security.InvalidKeyException
key - the key to use for decryption.
java.security.InvalidKeyException - if the key is invalid.
protected int engineUpdate(byte[] in,
int inOffset,
int inLen,
byte[] out,
int outOffset)
in and out may be the same array, and the input and output regions may overlap.
in - the input data.inOffset - the offset into in specifying where the data starts.inLen - the length of the subarray.out - the output array.outOffset - the offset indicating where to start writing into the out array.
public void rc4(byte[] in,
int inOffset,
int inLen,
byte[] out,
int outOffset)
in - the input data.inOffset - the offset into in specifying where the data starts.inLen - the length of the subarray.out - the output array.outOffset - the offset indicating where to start writing into the out array.
|
DBAbstract API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||