public class C1
extends java.lang.Object
Constructor and Description |
---|
C1(int mode,
byte[] keyBase)
Constructs a C1 using mode and keyBase
|
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] value)
Decrypt
|
byte[] |
decrypt(java.lang.String valString)
Decryption
|
java.lang.String |
decrypt(java.lang.String valString,
boolean isHexString)
Decryption
|
byte[] |
encrypt(byte[] value)
Encryption
|
byte[] |
encrypt(java.lang.String valString)
Encryption
|
java.lang.String |
encrypt(java.lang.String valString,
boolean toHexString)
Encryption
|
static C1 |
getRC4DecrypterInstance(byte[] key)
Returns a RC4 instance
|
static C1 |
getRC4DecrypterInstance(java.lang.String key)
Returns a RC4 instance
|
static C1 |
getRC4EncrypterInstance(java.lang.String key)
Returns a RC4 instance
|
static C1 |
getRC4Instance()
Returns a RC4 instance
|
static C1 |
getRC4Instance(java.lang.String key)
Returns a RC4 instance
|
void |
init()
Init
|
public C1(int mode, byte[] keyBase)
mode
- ModekeyBase
- KeyBasepublic static C1 getRC4Instance()
public static C1 getRC4Instance(java.lang.String key)
key
- String containing a keypublic static C1 getRC4EncrypterInstance(java.lang.String key)
key
- String containing a keypublic static C1 getRC4DecrypterInstance(java.lang.String key)
key
- String containing a keypublic static C1 getRC4DecrypterInstance(byte[] key)
key
- String containing a keypublic void init()
public byte[] decrypt(java.lang.String valString)
valString
- value Stringpublic java.lang.String decrypt(java.lang.String valString, boolean isHexString)
valString
- value StringisHexString
- true if the value String is a Hex stringpublic byte[] decrypt(byte[] value)
value
- Valuepublic java.lang.String encrypt(java.lang.String valString, boolean toHexString)
valString
- value StringtoHexString
- true if the output should be a Hex stringpublic byte[] encrypt(java.lang.String valString)
valString
- value Stringpublic byte[] encrypt(byte[] value)
value
- byte array which should be encrypted