de.mud.ssh

Class SshPacket2


public class SshPacket2
extends de.mud.ssh.SshPacket

Version:
$Id: SshPacket2.java 499 2005-09-29 08:24:54Z leo $
Author:
Marcus Meissner

Field Summary

Fields inherited from class de.mud.ssh.SshPacket

byteArray, offset

Constructor Summary

SshPacket2(byte newType)
SshPacket2(SshCrypto _crypto)

Method Summary

byte[]
addPayload(buff[] )
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)
void
putMpInt(BigInteger bi)

Methods inherited from class de.mud.ssh.SshPacket

addPayload, getByte, getBytes, getData, getInt16, getInt32, getString, getType, isFinished, putByte, putBytes, putData, putInt16, putInt32, putMpInt, putString, setType

Constructor Details

SshPacket2

public SshPacket2(byte newType)

SshPacket2

public SshPacket2(SshCrypto _crypto)

Method Details

addPayload

public byte[] addPayload(buff[] )

getMpInt

public 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). 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.

getPayLoad

public byte[] getPayLoad(SshCrypto xcrypt,
                         long seqnr)
            throws IOException

putMpInt

public void putMpInt(BigInteger bi)
Overrides:
putMpInt in interface de.mud.ssh.SshPacket