Class java.crypt.DES
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.crypt.DES

java.crypt.BlockCipher
   |
   +----java.crypt.DES

public final class DES
extends BlockCipher
This class implements the DES block cipher.

The native code DES implementation used by the class was developed by, and is owned by, Eric Young

Copyright (C) 1995, 1996 Systemics Ltd (http://www.systemics.com/) All rights reserved.


Variable Index

 o BLOCK_LENGTH
This is the length of a block.
 o KEY_LENGTH
This is the length of a the user key.

Constructor Index

 o DES(byte[])
This creates a DES block cipher from a byte array of the correct length.

Method Index

 o blockDecrypt(byte[], int, byte[], int)
Decrypt a block.
 o blockEncrypt(byte[], int, byte[], int)
Encrypt a block.
 o blockLength()
Return the block length of this cipher.
 o keyLength()
Return the key length for this cipher.

Variables

 o BLOCK_LENGTH
  public final static int BLOCK_LENGTH
This is the length of a block.
 o KEY_LENGTH
  public final static int KEY_LENGTH
This is the length of a the user key.

Constructors

 o DES
  public DES(byte userKey[])
This creates a DES block cipher from a byte array of the correct length.
Parameters:
userKey - the user key.

Methods

 o blockEncrypt
  protected void blockEncrypt(byte in[],
                              int in_offset,
                              byte out[],
                              int out_offset)
Encrypt a block. The in and out buffers can be the same.
Parameters:
in - The data to be encrypted.
in_offset - The start of data within the in buffer.
out - The encrypted data.
out_offset - The start of data within the out buffer.
Overrides:
blockEncrypt in class BlockCipher
 o blockDecrypt
  protected void blockDecrypt(byte in[],
                              int in_offset,
                              byte out[],
                              int out_offset)
Decrypt a block. The in and out buffers can be the same.
Parameters:
in - The data to be decrypted.
in_offset - The start of data within the in buffer.
out - The decrypted data.
out_offset - The start of data within the out buffer.
Overrides:
blockDecrypt in class BlockCipher
 o blockLength
  public int blockLength()
Return the block length of this cipher.
Returns:
s the block length of this cipher.
Overrides:
blockLength in class BlockCipher
 o keyLength
  public int keyLength()
Return the key length for this cipher.
Returns:
s the key length of this cipher.
Overrides:
keyLength in class BlockCipher

All Packages  Class Hierarchy  This Package  Previous  Next  Index