com.maverick.ssh.components.jce
Class Ssh1Des3

java.lang.Object
  extended by com.maverick.ssh.components.SshCipher
      extended by com.maverick.ssh.components.jce.Ssh1Des3
All Implemented Interfaces:
SshComponent

public class Ssh1Des3
extends SshCipher

3DES cipher implementation for SSH1 protocol.

Author:
Lee David Painter

Field Summary
 
Fields inherited from class com.maverick.ssh.components.SshCipher
DECRYPT_MODE, ENCRYPT_MODE
 
Constructor Summary
Ssh1Des3()
           
 
Method Summary
 int getBlockSize()
          Get the cipher block size.
 String getName()
           
 void init(int mode, byte[] iv, byte[] keydata)
          Initialize the cipher with up to 40 bytes of iv and key data.
 void transform(byte[] src, int start, byte[] dest, int offset, int len)
          Transform the byte array according to the cipher mode; it is legal for the source and destination arrays to reference the same physical array so care should be taken in the transformation process to safeguard this rule.
 
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

Ssh1Des3

public Ssh1Des3()
         throws IOException
Throws:
IOException
Method Detail

getBlockSize

public int getBlockSize()
Description copied from class: SshCipher
Get the cipher block size.

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

getName

public String getName()
Specified by:
getName in interface SshComponent
Overrides:
getName in class SshCipher

init

public void init(int mode,
                 byte[] iv,
                 byte[] keydata)
          throws IOException
Description copied from class: SshCipher
Initialize the cipher with up to 40 bytes of iv and key data. Each implementation should take as much data from the initialization as it needs ignoring any data that it does not require.

Specified by:
init in class SshCipher
Parameters:
mode - the mode to operate
iv - the initiaization vector
keydata - the key data
Throws:
IOException

transform

public void transform(byte[] src,
                      int start,
                      byte[] dest,
                      int offset,
                      int len)
               throws IOException
Description copied from class: SshCipher
Transform the byte array according to the cipher mode; it is legal for the source and destination arrays to reference the same physical array so care should be taken in the transformation process to safeguard this rule.

Specified by:
transform in class SshCipher
Throws:
IOException


Copyright © 2013. All Rights Reserved.