phelps.crypto
Class RC4
public
class
RC4
extends Object
RSA's
RC4 encryption/decryption.
This should inherit from javax.crypto.CipherSpi and be used through javax.crypto.Cipher.getInstance("RC4").
However, it would take some effort to conform to the API,
and installation, in order to maintain security, is not automatic.
Thus, primarily for convenience of installation, it is provided outside of Java's cryptography architecture.
Version: $Revision: 1.8 $ $Date: 2003/06/01 08:06:17 $
Method Summary |
void | decrypt(byte[] data) Convenience method; same as decrypt(data, 0, data.length). |
void | decrypt(byte[] data, int off, int length)
Decrypt data from data, starting at off and extending for length bytes.
|
void | encrypt(byte[] data) Convenience method; same as encrypt(data, 0, data.length). |
void | encrypt(byte[] data, int off, int length)
Encrypt data from data, starting at off and extending for length bytes.
|
void | reset() |
public RC4(byte[] key)
public void decrypt(byte[] data)
Convenience method; same as decrypt(data, 0, data.length).
public void decrypt(byte[] data, int off, int length)
Decrypt data from data, starting at off and extending for length bytes.
Input data is mutated.
public void encrypt(byte[] data)
Convenience method; same as encrypt(data, 0, data.length).
public void encrypt(byte[] data, int off, int length)
Encrypt data from data, starting at off and extending for length bytes.
In fact RC4 is symmetric so encrypt and decrypt are the same, but separate method names make intentions clearer.
public void reset()