All Packages  Class Hierarchy  This Package  Previous  Next  Index


Class Acme.Crypto.DesCipher

java.lang.Object
   |
   +----Acme.Crypto.CryptoUtils
           |
           +----Acme.Crypto.Cipher
                   |
                   +----Acme.Crypto.BlockCipher
                           |
                           +----Acme.Crypto.DesCipher

public class DesCipher
extends BlockCipher
The DES encryption method.

This is surprisingly fast, for pure Java. On a SPARC 20, wrapped in Acme.Crypto.EncryptedOutputStream or Acme.Crypto.EncryptedInputStream, it does around 7000 bytes/second.

Most of this code is by Dave Zimmerman , and is Copyright (c) 1996 Widget Workshop, Inc. See the source file for details.

Fetch the software.
Fetch the entire Acme package.

See Also:
Des3Cipher, EncryptedOutputStream, EncryptedInputStream

Constructor Index

 o DesCipher(byte[])
 o DesCipher(String)

Method Index

 o decrypt(byte[], int, byte[], int)
Decrypt a block of eight bytes.
 o encrypt(byte[], int, byte[], int)
Encrypt a block of eight bytes.
 o setKey(byte[])
Set the key.

Constructors

 o DesCipher
 public DesCipher(String keyStr)
 o DesCipher
 public DesCipher(byte key[])

Methods

 o setKey
 public void setKey(byte key[])
Set the key.

Overrides:
setKey in class Cipher
 o encrypt
 public void encrypt(byte clearText[],
                     int clearOff,
                     byte cipherText[],
                     int cipherOff)
Encrypt a block of eight bytes.

Overrides:
encrypt in class BlockCipher
 o decrypt
 public void decrypt(byte cipherText[],
                     int cipherOff,
                     byte clearText[],
                     int clearOff)
Decrypt a block of eight bytes.

Overrides:
decrypt in class BlockCipher

All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs