jcifs.util

Class DES


public class DES
extends java.lang.Object

This code is derived from the above source JCIFS API Norbert Hranitzky

and modified again by Michael B. Allen

Constructor Summary

DES()
DES(byte[] key)

Method Summary

byte[]
decrypt(byte[] cipherText)
decrypts an array where the length must be a multiple of 8
void
decrypt(byte[] cipherText, byte[] clearText)
byte[]
encrypt(byte[] clearText)
encrypts an array where the length must be a multiple of 8
void
encrypt(byte[] clearText, byte[] cipherText)
static void
makeSMBKey(byte[] key7, byte[] key8)
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)

Constructor Details

DES

public DES()

DES

public DES(byte[] key)

Method Details

decrypt

public byte[] decrypt(byte[] cipherText)
decrypts an array where the length must be a multiple of 8

decrypt

public void decrypt(byte[] cipherText,
                    byte[] clearText)

encrypt

public byte[] encrypt(byte[] clearText)
encrypts an array where the length must be a multiple of 8

encrypt

public void encrypt(byte[] clearText,
                    byte[] cipherText)

makeSMBKey

public static void makeSMBKey(byte[] key7,
                              byte[] key8)

setKey

public void setKey(byte[] key)

spreadIntsToBytes

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

squashBytesToInts

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