public class RC4 extends Object
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 and Description |
---|
RC4(byte[] key)
Initializes the class with a byte array key.
|
RC4(String key)
Initializes the class with a string key.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
rc4(byte[] buf)
RC4 encryption/decryption.
|
byte[] |
rc4(String data)
RC4 encryption/decryption.
|
public RC4(String key) throws NullPointerException
key
- the encryption/decryption keyNullPointerException
public RC4(byte[] key) throws NullPointerException
key
- the encryption/decryption keyNullPointerException
public byte[] rc4(String data)
data
- the data to be encrypted/decryptedpublic byte[] rc4(byte[] buf)
buf
- the data to be encrypted/decryptedCopyright © 2001–2019 KnowGate. All rights reserved.