|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.acl.RC4
public class RC4
This is a simple implementation of the RC4 (tm) encryption algorithm. The author implemented this class for some simple applications that don't need/want/require the Sun's JCE framework.
But if you are looking for encryption algorithms for a full-blown application, it would be better to stick with Sun's JCE framework. You can find a *free* JCE implementation with RC4 (tm) at Cryptix (http://www.cryptix.org/).
Note that RC4 (tm) is a trademark of RSA Data Security, Inc. Also, if you are within USA, you may need to acquire licenses from RSA to use RC4. Please check your local law. The author is not responsible for any illegal use of this code.
| Constructor Summary | |
|---|---|
RC4(byte[] key)
Initializes the class with a byte array key. |
|
RC4(java.lang.String key)
Initializes the class with a string key. |
|
| Method Summary | |
|---|---|
byte[] |
rc4(byte[] buf)
RC4 encryption/decryption. |
byte[] |
rc4(java.lang.String data)
RC4 encryption/decryption. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RC4(java.lang.String key)
throws java.lang.NullPointerException
key - the encryption/decryption key
java.lang.NullPointerException
public RC4(byte[] key)
throws java.lang.NullPointerException
key - the encryption/decryption key
java.lang.NullPointerException| Method Detail |
|---|
public byte[] rc4(java.lang.String data)
data - the data to be encrypted/decrypted
public byte[] rc4(byte[] buf)
buf - the data to be encrypted/decrypted
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||