de.mud.ssh
Class SshPacket1
java.lang.Object
de.mud.ssh.SshPacket1
public class SshPacket1
- extends java.lang.Object
- Version:
- $Id: SshPacket1.java 499 2005-09-29 08:24:54Z leo $
- Author:
- Marcus Meissner
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
byteArray
protected byte[] byteArray
offset
protected int offset
SshPacket1
public SshPacket1(SshCrypto _crypto)
SshPacket1
public SshPacket1(byte newType)
getMpInt
public byte[] getMpInt()
- Return the mp-int at the position offset in the data
First 2 bytes are the number of bits in the integer, msb first
(for example, the value 0x00012345 would have 17 bits). The
value zero has zero bits. It is permissible that the number of
bits be larger than the real number of bits.
The number of bits is followed by (bits + 7) / 8 bytes of binary
data, msb first, giving the value of the integer.
putMpInt
public void putMpInt(java.math.BigInteger bi)
addPayload
public byte[] addPayload(byte[] buff)
getData
public byte[] getData()
putData
public void putData(byte[] data)
isFinished
public boolean isFinished()
getType
public byte getType()
setType
public void setType(byte ntype)
getInt32
public int getInt32()
getInt16
public int getInt16()
getString
public java.lang.String getString()
getByte
public byte getByte()
getBytes
public byte[] getBytes(int cnt)
putInt16
public void putInt16(int xint)
putInt32
public void putInt32(int xint)
putByte
public void putByte(byte xbyte)
putBytes
public void putBytes(byte[] bytes)
putString
public void putString(java.lang.String str)
- Add a SSH String to a packet. The incore representation is a
INT32 length
BYTE[length] data
- Parameters:
str:
- The string to be added.