de.mud.ssh
public class SshPacket2 extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected byte[] |
byteArray |
protected int |
offset |
Constructor and Description |
---|
SshPacket2(byte newType) |
SshPacket2(SshCrypto _crypto) |
Modifier and Type | Method and Description |
---|---|
byte[] |
addPayload(byte[] buff) |
byte |
getByte() |
byte[] |
getBytes(int cnt) |
byte[] |
getData() |
int |
getInt16() |
int |
getInt32() |
java.math.BigInteger |
getMpInt()
Return the mp-int at the position offset in the data
First 4 bytes are the number of bytes in the integer, msb first
(for example, the value 0x00012345 would have 17 bits).
|
byte[] |
getPayLoad(SshCrypto xcrypt,
long seqnr) |
java.lang.String |
getString() |
byte |
getType() |
boolean |
isFinished() |
void |
putByte(byte xbyte) |
void |
putBytes(byte[] bytes) |
void |
putData(byte[] data) |
void |
putInt16(int xint) |
void |
putInt32(int xint) |
void |
putMpInt(java.math.BigInteger bi) |
void |
putString(java.lang.String str)
Add a SSH String to a packet.
|
void |
setType(byte ntype) |
public SshPacket2(SshCrypto _crypto)
public SshPacket2(byte newType)
public java.math.BigInteger getMpInt()
public void putMpInt(java.math.BigInteger bi)
public byte[] getPayLoad(SshCrypto xcrypt, long seqnr) throws java.io.IOException
java.io.IOException
public byte[] addPayload(byte[] buff)
public byte[] getData()
public void putData(byte[] data)
public boolean isFinished()
public byte getType()
public void setType(byte ntype)
public int getInt32()
public int getInt16()
public java.lang.String getString()
public byte getByte()
public byte[] getBytes(int cnt)
public void putInt16(int xint)
public void putInt32(int xint)
public void putByte(byte xbyte)
public void putBytes(byte[] bytes)
public void putString(java.lang.String str)
str:
- The string to be added.