com.maverick.ssh.components.standalone
Class BlowfishCbc

java.lang.Object
  extended by com.maverick.ssh.components.SshCipher
      extended by com.maverick.ssh.components.standalone.BlowfishCbc

public class BlowfishCbc
extends SshCipher

Blowfish cipher for SSH2.

Author:
Lee David Painter

Field Summary
 
Fields inherited from class com.maverick.ssh.components.SshCipher
DECRYPT_MODE, ENCRYPT_MODE
 
Constructor Summary
BlowfishCbc()
           
 
Method Summary
 java.lang.String getAlgorithm()
           
 int getBlockSize()
          Get the block size of the cipher
 void init(int mode, byte[] iv, byte[] keydata)
          Initialize the CBC block cipher.
 void transform(byte[] in, int start, byte[] output, int offset, int length)
          Transform the data
 
Methods inherited from class com.maverick.ssh.components.SshCipher
transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlowfishCbc

public BlowfishCbc()
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Overrides:
getAlgorithm in class SshCipher

init

public void init(int mode,
                 byte[] iv,
                 byte[] keydata)
Initialize the CBC block cipher.

Specified by:
init in class SshCipher
Parameters:
mode - the mode to operate in
iv - the initialization vector
keydata - the key
Throws:
java.io.IOException

getBlockSize

public int getBlockSize()
Get the block size of the cipher

Specified by:
getBlockSize in class SshCipher
Returns:
the block size in bytes

transform

public void transform(byte[] in,
                      int start,
                      byte[] output,
                      int offset,
                      int length)
               throws java.io.IOException
Transform the data

Specified by:
transform in class SshCipher
Parameters:
in - input byte[]
start -
output - byte[]
offset -
length -
Throws:
java.io.IOException


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.