Package net.i2p.data.i2cp
Class BlindingInfoMessage
java.lang.Object
net.i2p.data.i2cp.I2CPMessageImpl
net.i2p.data.i2cp.BlindingInfoMessage
- All Implemented Interfaces:
I2CPMessage
Advise the router that the endpoint is blinded.
Client to router. There is no reply.
Preliminary - subject to change -
See proposal 123.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionBlindingInfoMessage(String h, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Deprecated.unimplemented on router sideBlindingInfoMessage(BlindData bd, SessionId id) This is the constructor used by I2CP client-side.BlindingInfoMessage(Destination d, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) BlindingInfoMessage(Hash h, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Deprecated.unimplemented on router sideBlindingInfoMessage(SigningPublicKey s, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoReadMessage(InputStream in, int size) Read in the payload part of the message (after the initial 4 byte size and 1 byte type)protected byte[]Write out the payload part of the message (not including the 4 byte size and 1 byte type)intintgetHash()longintgetType()Return the unique identifier for this type of message, as specified in the network specification document under #ClientAccessLayerMessagesReturn the SessionId for this message.toString()Methods inherited from class net.i2p.data.i2cp.I2CPMessageImpl
readBytes, readMessage, readMessage, writeBytes, writeMessage
-
Field Details
-
MESSAGE_TYPE
public static final int MESSAGE_TYPE- See Also:
-
TYPE_HASH
public static final int TYPE_HASH- See Also:
-
TYPE_HOST
public static final int TYPE_HOST- See Also:
-
TYPE_DEST
public static final int TYPE_DEST- See Also:
-
TYPE_KEY
public static final int TYPE_KEY- See Also:
-
-
Constructor Details
-
BlindingInfoMessage
public BlindingInfoMessage() -
BlindingInfoMessage
This is the constructor used by I2CP client-side. Will create a DEST or KEY message type, depending on whether BlindData has the full destination. -
BlindingInfoMessage
@Deprecated public BlindingInfoMessage(Hash h, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Deprecated.unimplemented on router sideHASH not supported by router and may not be useful- Parameters:
expiration- ms from now or 0 for foreverauthType- 0 (none), 1 (DH), 3 (PSK)privKey- null for auth none, non-null for DH/PSKsecret- may be null, 255 UTF-8 bytes max
-
BlindingInfoMessage
@Deprecated public BlindingInfoMessage(String h, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) Deprecated.unimplemented on router sideHOST not supported by router and may not be useful- Parameters:
h- hostnameexpiration- ms from now or 0 for foreverauthType- 0 (none), 1 (DH), 3 (PSK)privKey- null for auth none, non-null for DH/PSKsecret- may be null, 255 UTF-8 bytes max
-
BlindingInfoMessage
public BlindingInfoMessage(Destination d, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) - Parameters:
expiration- ms from now or 0 for foreverauthType- 0 (none), 1 (DH), 3 (PSK)privKey- null for auth none, non-null for DH/PSKsecret- may be null, 255 UTF-8 bytes max
-
BlindingInfoMessage
public BlindingInfoMessage(SigningPublicKey s, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret) - Parameters:
expiration- ms from now or 0 for foreverauthType- 0 (none), 1 (DH), 3 (PSK)privKey- null for auth none, non-null for DH/PSKsecret- may be null, 255 UTF-8 bytes max
-
-
Method Details
-
getSessionId
-
sessionId
Return the SessionId for this message.- Specified by:
sessionIdin interfaceI2CPMessage- Overrides:
sessionIdin classI2CPMessageImpl- Returns:
- null always. Extending classes with a SessionId must override.
-
getTimeout
public long getTimeout()- Returns:
- ms 1 to 2**32 - 1
-
getAuthType
public int getAuthType()- Returns:
- 0 (none), 1 (DH), 3 (PSK)
-
getEndpointType
public int getEndpointType()- Returns:
- 0 (hash) or 1 (host) or 2 (dest) or 3 (key)
-
getHash
- Returns:
- only valid if endpoint type == 0 or 2
-
getHostname
- Returns:
- only valid if endpoint type == 1
-
getDestination
- Returns:
- only valid if endpoint type == 2
-
getSigningPublicKey
- Returns:
- only valid if endpoint type == 2 or 3
-
getPrivateKey
- Returns:
- private key or null
-
getSecret
- Returns:
- secret or null
-
getBlindData
- Returns:
- blind data or null if not enough info
-
doReadMessage
Description copied from class:I2CPMessageImplRead in the payload part of the message (after the initial 4 byte size and 1 byte type)- Specified by:
doReadMessagein classI2CPMessageImpl- Parameters:
in- InputStreamsize- payload size- Throws:
I2CPMessageExceptionIOException
-
doWriteMessage
Description copied from class:I2CPMessageImplWrite out the payload part of the message (not including the 4 byte size and 1 byte type)- Specified by:
doWriteMessagein classI2CPMessageImpl- Returns:
- byte array
- Throws:
I2CPMessageExceptionIOException
-
getType
public int getType()Description copied from interface:I2CPMessageReturn the unique identifier for this type of message, as specified in the network specification document under #ClientAccessLayerMessages- Returns:
- unique identifier for this type of message
-
toString
-