de.mud.ssh
Class Cipher

java.lang.Object
  |
  +--de.mud.ssh.Cipher
Direct Known Subclasses:
Blowfish, DES, DES3, IDEA, NONE

public abstract class Cipher
extends java.lang.Object

Cipher class is the type for all other ciphers.

Version:
$Id: Cipher.java,v 1.2 2002/10/26 07:15:59 leo Exp $
Author:
Marcus Meissner

Constructor Summary
Cipher()
           
 
Method Summary
 byte[] decrypt(byte[] src)
          Decrypt source byte array using the instantiated algorithm.
abstract  void decrypt(byte[] src, int srcOff, byte[] dest, int destOff, int len)
          The actual decryption takes place here.
 byte[] encrypt(byte[] src)
          Encrypt source byte array using the instantiated algorithm.
abstract  void encrypt(byte[] src, int srcOff, byte[] dest, int destOff, int len)
          The actual encryption takes place here.
static Cipher getInstance(java.lang.String algorithm)
           
abstract  void setKey(byte[] key)
           
 void setKey(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cipher

public Cipher()
Method Detail

getInstance

public static Cipher getInstance(java.lang.String algorithm)

encrypt

public byte[] encrypt(byte[] src)
Encrypt source byte array using the instantiated algorithm.


encrypt

public abstract void encrypt(byte[] src,
                             int srcOff,
                             byte[] dest,
                             int destOff,
                             int len)
The actual encryption takes place here.


decrypt

public byte[] decrypt(byte[] src)
Decrypt source byte array using the instantiated algorithm.


decrypt

public abstract void decrypt(byte[] src,
                             int srcOff,
                             byte[] dest,
                             int destOff,
                             int len)
The actual decryption takes place here.


setKey

public abstract void setKey(byte[] key)

setKey

public void setKey(java.lang.String key)