synergynetframework.appsystem.contentsystem.items.utils.vnc
Class DesCipher

java.lang.Object
  extended by synergynetframework.appsystem.contentsystem.items.utils.vnc.DesCipher

public class DesCipher
extends java.lang.Object

The Class DesCipher.


Constructor Summary
DesCipher(byte[] key)
          Instantiates a new des cipher.
 
Method Summary
 void decrypt(byte[] cipherText, int cipherOff, byte[] clearText, int clearOff)
          Decrypt.
 void encrypt(byte[] clearText, int clearOff, byte[] cipherText, int cipherOff)
          Encrypt.
 void setKey(byte[] key)
          Sets the key.
static void spreadIntsToBytes(int[] inInts, int inOff, byte[] outBytes, int outOff, int intLen)
          Spread ints to bytes.
static void squashBytesToInts(byte[] inBytes, int inOff, int[] outInts, int outOff, int intLen)
          Squash bytes to ints.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesCipher

public DesCipher(byte[] key)
Instantiates a new des cipher.

Parameters:
key - the key
Method Detail

spreadIntsToBytes

public static void spreadIntsToBytes(int[] inInts,
                                     int inOff,
                                     byte[] outBytes,
                                     int outOff,
                                     int intLen)
Spread ints to bytes.

Parameters:
inInts - the in ints
inOff - the in off
outBytes - the out bytes
outOff - the out off
intLen - the int len

squashBytesToInts

public static void squashBytesToInts(byte[] inBytes,
                                     int inOff,
                                     int[] outInts,
                                     int outOff,
                                     int intLen)
Squash bytes to ints.

Parameters:
inBytes - the in bytes
inOff - the in off
outInts - the out ints
outOff - the out off
intLen - the int len

decrypt

public void decrypt(byte[] cipherText,
                    int cipherOff,
                    byte[] clearText,
                    int clearOff)
Decrypt.

Parameters:
cipherText - the cipher text
cipherOff - the cipher off
clearText - the clear text
clearOff - the clear off

encrypt

public void encrypt(byte[] clearText,
                    int clearOff,
                    byte[] cipherText,
                    int cipherOff)
Encrypt.

Parameters:
clearText - the clear text
clearOff - the clear off
cipherText - the cipher text
cipherOff - the cipher off

setKey

public void setKey(byte[] key)
Sets the key.

Parameters:
key - the new key