com.maverick.ssh.components.standalone
Class TripleDesCbc

java.lang.Object
  extended bycom.maverick.ssh.components.SshCipher
      extended bycom.maverick.ssh.components.standalone.CbcBlockCipher
          extended bycom.maverick.ssh.components.standalone.TripleDesCbc

public class TripleDesCbc
extends com.maverick.ssh.components.standalone.CbcBlockCipher

3DES cipher for SSH2.

Author:
Lee David Painter

Field Summary
static java.lang.String TRIPLEDES_CBC
           
 
Fields inherited from class com.maverick.ssh.components.SshCipher
DECRYPT_MODE, ENCRYPT_MODE
 
Constructor Summary
TripleDesCbc()
          Contstruct the uninitialized cipher.
 
Method Summary
 java.lang.String getAlgorithm()
          Get the algorithm name
 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
 

Field Detail

TRIPLEDES_CBC

public static final java.lang.String TRIPLEDES_CBC
See Also:
Constant Field Values
Constructor Detail

TripleDesCbc

public TripleDesCbc()
Contstruct the uninitialized cipher.

Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Get the algorithm name

Overrides:
getAlgorithm in class SshCipher
Returns:
"3des-cbc"

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.