com.aelitis.azureus.core.networkmanager.impl
Class ProtocolDecoderPHE
java.lang.Object
com.aelitis.azureus.core.networkmanager.impl.ProtocolDecoder
com.aelitis.azureus.core.networkmanager.impl.ProtocolDecoderPHE
public class ProtocolDecoderPHE
- extends ProtocolDecoder
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_INCOMING_INITIAL_PACKET_SIZE
public static final int MIN_INCOMING_INITIAL_PACKET_SIZE
KEYA_IV
public static final byte[] KEYA_IV
KEYB_IV
public static final byte[] KEYB_IV
REQ1_IV
public static final byte[] REQ1_IV
REQ2_IV
public static final byte[] REQ2_IV
REQ3_IV
public static final byte[] REQ3_IV
VC
public static final byte[] VC
ProtocolDecoderPHE
public ProtocolDecoderPHE(TransportHelper _transport,
byte[][] _shared_secrets,
java.nio.ByteBuffer _header,
java.nio.ByteBuffer _initial_data,
ProtocolDecoderAdapter _adapter)
throws java.io.IOException
- Throws:
java.io.IOException
getMaxIncomingInitialPacketSize
public static int getMaxIncomingInitialPacketSize(boolean min_overheads)
isCryptoOK
public static boolean isCryptoOK()
addSecretsSupport
public static void addSecretsSupport(byte[][] secrets)
removeSecretsSupport
public static void removeSecretsSupport(byte[][] secrets)
initCrypto
protected void initCrypto()
throws java.io.IOException
- Throws:
java.io.IOException
completeDH
protected void completeDH(byte[] buffer)
throws java.io.IOException
- Throws:
java.io.IOException
setupCrypto
protected void setupCrypto()
throws java.io.IOException
- Throws:
java.io.IOException
handshakeComplete
protected void handshakeComplete()
throws java.io.IOException
- Throws:
java.io.IOException
process
protected void process()
throws java.io.IOException
- Throws:
java.io.IOException
read
protected void read(java.nio.ByteBuffer buffer)
throws java.io.IOException
- Throws:
java.io.IOException
write
protected void write(java.nio.ByteBuffer buffer)
throws java.io.IOException
- Throws:
java.io.IOException
selectSuccess
public boolean selectSuccess(TransportHelper transport,
java.lang.Object attachment,
boolean write_operation)
selectFailure
public void selectFailure(TransportHelper transport,
java.lang.Object attachment,
java.lang.Throwable msg)
bigIntegerToBytes
protected byte[] bigIntegerToBytes(java.math.BigInteger bi,
int num_bytes)
bytesToBigInteger
protected java.math.BigInteger bytesToBigInteger(byte[] bytes,
int offset,
int len)
getPaddingMax
protected int getPaddingMax()
getRandomPadding
protected static byte[] getRandomPadding(int max_len)
getZeroPadding
protected static byte[] getZeroPadding(int max_len)
generateDHKeyPair
protected static java.security.KeyPair generateDHKeyPair(TransportHelper transport,
boolean outbound)
throws java.io.IOException
- Throws:
java.io.IOException
complete
protected void complete()
failed
protected void failed(java.lang.Throwable cause)
isComplete
public boolean isComplete(long now)
- Specified by:
isComplete
in class ProtocolDecoder
getFilter
public TransportHelperFilter getFilter()
- Specified by:
getFilter
in class ProtocolDecoder
getLastReadTime
public long getLastReadTime()
getString
public java.lang.String getString()