net.kano.joscar.rvcmd.trillcrypt
Class TrillianCryptReqRvCmd

java.lang.Object
  extended byRvCommand
      extended byAbstractTrillianCryptRvCmd
          extended byTrillianCryptReqRvCmd

public class TrillianCryptReqRvCmd
extends AbstractTrillianCryptRvCmd

A rendezvous command used to initiate a Trillian Secure IM session. This command appears to contain a Diffie-Hellman modulus and public value, but as of this writing, it is unclear what exactly these values mean and how exactly to use/create/send messages over a Secure IM connection. It appears, however, that Trillian always uses a generator (g) value of 5. (For fun, try sending a Trillian client a modulus of 5 in this command.)

See Also:
net.kano.joscar.rvcmd.trillcrypt

Field Summary
 
Fields inherited from class AbstractTrillianCryptRvCmd
CMDTYPE_ACCEPT, CMDTYPE_BEGIN, CMDTYPE_CLOSE, CMDTYPE_MESSAGE, CMDTYPE_REQUEST, VERSION_DEFAULT
 
Fields inherited from class RvCommand
RVSTATUS_ACCEPT, RVSTATUS_DENY, RVSTATUS_REQUEST
 
Constructor Summary
TrillianCryptReqRvCmd(java.math.BigInteger modulus, java.math.BigInteger publicValue)
          Creates a new outgoing Trillian Encryption session request with the given Diffie-Hellman modulus and public value.
TrillianCryptReqRvCmd(RecvRvIcbm icbm)
          Creatse a new Trillian Encryption session request from the given incoming Trillian Encryption session request RV ICBM.
 
Method Summary
 java.math.BigInteger getModulus()
          Returns the Diffie-Hellman modulus sent in this command.
 java.math.BigInteger getPublicValue()
          Returns the Diffie-Hellman public value sent in this command.
 java.lang.String toString()
           
protected  void writeExtraTlvs(java.io.OutputStream out)
          Writes any "extra" TLV's to be sent in this command to the given stream.
 
Methods inherited from class AbstractTrillianCryptRvCmd
getBigIntFromHexBlock, getBigIntHexBlock, getCmdType, getExtraTlvs, getTrillianCmdType, getVersion, writeRvData
 
Methods inherited from class RvCommand
getCapabilityBlock, getRvStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrillianCryptReqRvCmd

public TrillianCryptReqRvCmd(RecvRvIcbm icbm)
Creatse a new Trillian Encryption session request from the given incoming Trillian Encryption session request RV ICBM.

Parameters:
icbm - an incoming Trillian Encryption session request RV ICBM command

TrillianCryptReqRvCmd

public TrillianCryptReqRvCmd(java.math.BigInteger modulus,
                             java.math.BigInteger publicValue)
Creates a new outgoing Trillian Encryption session request with the given Diffie-Hellman modulus and public value.

Parameters:
modulus - the Diffie-Hellman modulus
publicValue - the Diffie-Hellman public value
Method Detail

getModulus

public final java.math.BigInteger getModulus()
Returns the Diffie-Hellman modulus sent in this command.

Returns:
this command's Diffie-Hellman modulus, or null if none was sent

getPublicValue

public final java.math.BigInteger getPublicValue()
Returns the Diffie-Hellman public value sent in this command.

Returns:
this command's Diffie-Hellman public value, or null if none was sent

writeExtraTlvs

protected void writeExtraTlvs(java.io.OutputStream out)
                       throws java.io.IOException
Description copied from class: AbstractTrillianCryptRvCmd
Writes any "extra" TLV's to be sent in this command to the given stream.

Specified by:
writeExtraTlvs in class AbstractTrillianCryptRvCmd
Parameters:
out - the stream to which to write
Throws:
java.io.IOException

toString

public java.lang.String toString()