|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.rfb.server.DesCipher
public class DesCipher
Implements the DES algorithm for encryption / decryption.
Constructor Summary | |
---|---|
DesCipher(byte[] key)
Constructor, byte-array key. |
Method Summary | |
---|---|
void |
decrypt(byte[] cipherText,
int cipherOff,
byte[] clearText,
int clearOff)
Decrypt a block of eight bytes. |
void |
encrypt(byte[] clearText,
int clearOff,
byte[] cipherText,
int cipherOff)
Encrypt a block of eight bytes. |
void |
setKey(byte[] key)
Setter for 'key' |
static void |
spreadIntsToBytes(int[] inInts,
int inOff,
byte[] outBytes,
int outOff,
int intLen)
Spread ints into bytes. |
static void |
squashBytesToInts(byte[] inBytes,
int inOff,
int[] outInts,
int outOff,
int intLen)
Squash bytes down to ints. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DesCipher(byte[] key)
key
- The key to use for the cipher.Method Detail |
---|
public void setKey(byte[] key)
key
- Sets the key to use for the cipher.public void encrypt(byte[] clearText, int clearOff, byte[] cipherText, int cipherOff)
public void decrypt(byte[] cipherText, int cipherOff, byte[] clearText, int clearOff)
cipherText
- cipherOff
- clearText
- clearOff
- public static void squashBytesToInts(byte[] inBytes, int inOff, int[] outInts, int outOff, int intLen)
public static void spreadIntsToBytes(int[] inInts, int inOff, byte[] outBytes, int outOff, int intLen)
inInts
- inOff
- outBytes
- outOff
- intLen
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |