All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.security.provider.DES

java.lang.Object
   |
   +----java.security.Cipher
           |
           +----sun.security.provider.DES

public class DES
extends Cipher
implements SymmetricCipher, DESConstants

Constructor Index

 o DES()

Method Index

 o engineBlockSize()
SPI: Returns the length of an input block, in bytes.
 o engineInitDecrypt(Key)
SPI: Initializes this cipher for decryption, using the specified key.
 o engineInitEncrypt(Key)
SPI:Initializes this cipher for encryption, using the specified key.
 o engineUpdate(byte[], int, int, byte[], int)
SPI: Add to the bytes to be processed.
 o getAlgName()

Constructors

 o DES
 public DES()

Methods

 o engineInitEncrypt
 protected void engineInitEncrypt(Key key) throws InvalidKeyException
SPI:Initializes this cipher for encryption, using the specified key.

After a call to this method, the cipher's state is ENCRYPT.

Parameters:
key - the key to use for encryption.
Throws: InvalidKeyException
if the key is invalid.
Overrides:
engineInitEncrypt in class Cipher
 o engineInitDecrypt
 protected void engineInitDecrypt(Key key) throws InvalidKeyException
SPI: Initializes this cipher for decryption, using the specified key.

After a call to this method, the cipher's state is DECRYPTION.

Parameters:
key - the key to use for decryption.
Throws: InvalidKeyException
if the key is invalid.
Overrides:
engineInitDecrypt in class Cipher
 o engineUpdate
 public int engineUpdate(byte in[],
                         int inOffset,
                         int inLen,
                         byte out[],
                         int outOffset)
SPI: Add to the bytes to be processed. The result is written to the provided out buffer. The implementation is free to buffer any data, if the number of bytes passed is insufficient to process a whole block.

Parameters:
in - the data to be updated.
out - the buffer in which to write processed data, if any.
Returns:
the number of bytes written to out.
Overrides:
engineUpdate in class Cipher
 o getAlgName
 public String getAlgName()
 o engineBlockSize
 protected int engineBlockSize()
SPI: Returns the length of an input block, in bytes.

Overrides:
engineBlockSize in class Cipher

All Packages  Class Hierarchy  This Package  Previous  Next  Index