com.monica.javacom.ssh
Class MJCSSHNoneCiphering

java.lang.Object
  |
  +--com.monica.javacom.ssh.MJCSSHNoneCiphering
All Implemented Interfaces:
MJCSSHCipherAlgorithm

public class MJCSSHNoneCiphering
extends java.lang.Object
implements MJCSSHCipherAlgorithm

Class for implementing the "none" ciphering method. This means no ciphering at all, eg. a transparent channel.


Constructor Summary
MJCSSHNoneCiphering()
           
 
Method Summary
 java.lang.String decode(java.lang.String encoded_data)
          Method for decryption of a String.
 java.lang.String encode(java.lang.String data)
          Method for encryption of a String.
 java.lang.String getCipherAlgorithmName()
          Returns the MJC name of the of the MJCSSHCipherAlgorithm.
 java.lang.String getCipherAlgorithmVersion()
          Returns the MJC version of the MJCSSHCipherAlgorithm.
 int getCipherBlockSize()
          Returns the length of the minimal encryption length.
 java.lang.Object getState()
          Returns the state of the cipher mechanism.
 void setKeys(java.lang.String key, java.lang.String iv)
          Method for setting the cryptographic key and the initialization vector.
 void setState(java.lang.Object o)
          Sets the state of the cipher mechanism.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MJCSSHNoneCiphering

public MJCSSHNoneCiphering()
Method Detail

getCipherAlgorithmName

public java.lang.String getCipherAlgorithmName()
Description copied from interface: MJCSSHCipherAlgorithm
Returns the MJC name of the of the MJCSSHCipherAlgorithm.
Specified by:
getCipherAlgorithmName in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Returns:
String: the MJC name of the MJCSSHCipherAlgorithm

getCipherAlgorithmVersion

public java.lang.String getCipherAlgorithmVersion()
Description copied from interface: MJCSSHCipherAlgorithm
Returns the MJC version of the MJCSSHCipherAlgorithm.
Specified by:
getCipherAlgorithmVersion in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Returns:
String: the MJC version of the MJCSSHCipherAlgorithm

encode

public java.lang.String encode(java.lang.String data)
Description copied from interface: MJCSSHCipherAlgorithm
Method for encryption of a String. The to be encrypted String has to be of a length that is a multipy of getCipherBlockSize(). Encryption is done with the key set with setKeys(String, String).
Specified by:
encode in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Parameters:
String - s: the String to be encrypted
Returns:
String: the encrypted String

decode

public java.lang.String decode(java.lang.String encoded_data)
Description copied from interface: MJCSSHCipherAlgorithm
Method for decryption of a String. The to be decrypted String has to be of a length that is a multiply of getCipherBlockSize(). Decryption is done with the key set with setKeys(String, String).
Specified by:
decode in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Parameters:
String - s: the String to be decrypted
Returns:
String: the decrypted String

getCipherBlockSize

public int getCipherBlockSize()
Description copied from interface: MJCSSHCipherAlgorithm
Returns the length of the minimal encryption length. Strings for encryption/decryption have to be of a length that is a multiply of this.
Specified by:
getCipherBlockSize in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Returns:
int: the minimal encryption length

getState

public java.lang.Object getState()
Description copied from interface: MJCSSHCipherAlgorithm
Returns the state of the cipher mechanism. This state can be restored with the setState method.
Specified by:
getState in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Returns:
Object: the state of the cipher mechanism

setState

public void setState(java.lang.Object o)
Description copied from interface: MJCSSHCipherAlgorithm
Sets the state of the cipher mechanism.
Specified by:
setState in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Parameters:
Object - o: the to be set state of the cipher mechanism

setKeys

public void setKeys(java.lang.String key,
                    java.lang.String iv)
Description copied from interface: MJCSSHCipherAlgorithm
Method for setting the cryptographic key and the initialization vector.
Specified by:
setKeys in interface MJCSSHCipherAlgorithm
Following copied from interface: com.monica.javacom.interfaces.MJCSSHCipherAlgorithm
Parameters:
String - key: the key for the cryptography
string - IV: the initialization vector