de.mud.ssh

Class Cipher

Known Direct 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 499 2005-09-29 08:24:54Z leo $
Author:
Marcus Meissner

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(String algorithm)
void
setKey(String key)
abstract void
setKey(byte[] key)

Method Details

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.

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.

getInstance

public static Cipher getInstance(String algorithm)

setKey

public void setKey(String key)

setKey

public abstract void setKey(byte[] key)