|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.monica.javacom.ssh.MJCSSH3DESCBC
Implements a 3DES-CBC encoder/decoder as described in FIPS PUB 46-3. As the main functionality, the coder gets a String which contains the initial data, and returns the coded representation of this String.
Constructor Summary | |
MJCSSH3DESCBC()
Constructs a new MJCSSH3DESCBC encoder/decoder object. |
Method Summary | |
java.lang.String |
decode(java.lang.String ciphertext)
Decodes the specified String. |
java.lang.String |
encode(java.lang.String text)
Encodes the specified String. |
java.lang.String |
getCipherAlgorithmName()
Returns the name of the coder algorithm. |
java.lang.String |
getCipherAlgorithmVersion()
Returns the version of the coder algorithm. |
int |
getCipherBlockSize()
Returns the length of the block that can be coded on this coder/decoder. |
java.lang.Object |
getState()
Returns the current state of the MJCSSH3DESCBC coder/decoder. |
void |
keySchedule(byte[] key)
Makes the key schedule computation. |
void |
setKeys(java.lang.String in_key,
java.lang.String iV)
Sets the key and the IV for the MJCSSH3DESCBC coder/decoder object. |
void |
setState(java.lang.Object state)
Sets the current state of the MJCSSH3DESCBC coder/decoder to the input value saved earlier. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MJCSSH3DESCBC()
Method Detail |
public void setKeys(java.lang.String in_key, java.lang.String iV)
setKeys
in interface MJCSSHCipherAlgorithm
in_key
- the String representation of the 3DES key-triple. Must be 24 bytes of length,
containing the three byte-octets, for the three DES coders respectively. Parity is not
checked.iV
- the String representation of the Initialisation Vector. Must be 8 bytes of length,
containing the 64 bits of IV.public java.lang.String encode(java.lang.String text)
encode
in interface MJCSSHCipherAlgorithm
text
- the input text which has to be encodedpublic java.lang.String decode(java.lang.String ciphertext)
decode
in interface MJCSSHCipherAlgorithm
ciphertext
- the input ciphertext which has to be decodedpublic void keySchedule(byte[] key)
key
- the byte array holding the 24 bytes of the three DES keys.public java.lang.Object getState()
getState
in interface MJCSSHCipherAlgorithm
public void setState(java.lang.Object state)
setState
in interface MJCSSHCipherAlgorithm
state
- the state-to-load of the MJCSSH3DESCBC coder/decoderpublic java.lang.String getCipherAlgorithmName()
getCipherAlgorithmName
in interface MJCSSHCipherAlgorithm
public java.lang.String getCipherAlgorithmVersion()
getCipherAlgorithmVersion
in interface MJCSSHCipherAlgorithm
public int getCipherBlockSize()
getCipherBlockSize
in interface MJCSSHCipherAlgorithm
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |