VNCj

gnu.rfb.server
Class DesCipher

java.lang.Object
  |
  +--gnu.rfb.server.DesCipher

public class DesCipher
extends Object


Field Summary
private static int[] bigbyte
           
private static byte[] bytebit
           
private  int[] decryptKeys
           
private  int[] encryptKeys
           
private static byte[] pc1
           
private static byte[] pc2
           
private static int[] SP1
           
private static int[] SP2
           
private static int[] SP3
           
private static int[] SP4
           
private static int[] SP5
           
private static int[] SP6
           
private static int[] SP7
           
private static int[] SP8
           
private  int[] tempInts
           
private static int[] totrot
           
 
Constructor Summary
DesCipher(byte[] key)
           
 
Method Summary
private  void cookey(int[] raw, int[] KnL)
           
 void decrypt(byte[] cipherText, int cipherOff, byte[] clearText, int clearOff)
           
private  void des(int[] inInts, int[] outInts, int[] keys)
           
private  void deskey(byte[] keyBlock, boolean encrypting, int[] KnL)
           
 void encrypt(byte[] clearText, int clearOff, byte[] cipherText, int cipherOff)
           
 void setKey(byte[] key)
           
static void spreadIntsToBytes(int[] inInts, int inOff, byte[] outBytes, int outOff, int intLen)
           
static void squashBytesToInts(byte[] inBytes, int inOff, int[] outInts, int outOff, int intLen)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encryptKeys

private int[] encryptKeys

decryptKeys

private int[] decryptKeys

tempInts

private int[] tempInts

bytebit

private static byte[] bytebit

bigbyte

private static int[] bigbyte

pc1

private static byte[] pc1

totrot

private static int[] totrot

pc2

private static byte[] pc2

SP1

private static int[] SP1

SP2

private static int[] SP2

SP3

private static int[] SP3

SP4

private static int[] SP4

SP5

private static int[] SP5

SP6

private static int[] SP6

SP7

private static int[] SP7

SP8

private static int[] SP8
Constructor Detail

DesCipher

public DesCipher(byte[] key)
Method Detail

setKey

public void setKey(byte[] key)

deskey

private void deskey(byte[] keyBlock,
                    boolean encrypting,
                    int[] KnL)

cookey

private void cookey(int[] raw,
                    int[] KnL)

encrypt

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

decrypt

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

des

private void des(int[] inInts,
                 int[] outInts,
                 int[] keys)

squashBytesToInts

public static void squashBytesToInts(byte[] inBytes,
                                     int inOff,
                                     int[] outInts,
                                     int outOff,
                                     int intLen)

spreadIntsToBytes

public static void spreadIntsToBytes(int[] inInts,
                                     int inOff,
                                     byte[] outBytes,
                                     int outOff,
                                     int intLen)

VNCj