public class BlindingInfoMessage extends I2CPMessageImpl
| Modifier and Type | Field and Description |
|---|---|
static int |
MESSAGE_TYPE
The message type
|
static int |
TYPE_DEST
Endpoint type for destination
|
static int |
TYPE_HASH
Endpoint type for hash
|
static int |
TYPE_HOST
Endpoint type for hostname
|
static int |
TYPE_KEY
Endpoint type for key
|
| Constructor and Description |
|---|
BlindingInfoMessage()
Creates an empty BlindingInfoMessage for reading
|
BlindingInfoMessage(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)
Creates a BlindingInfoMessage for a destination.
|
BlindingInfoMessage(SigningPublicKey s,
SessionId id,
int expiration,
int authType,
SigType blindType,
PrivateKey privKey,
String secret)
Creates a BlindingInfoMessage for a signing public key.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doReadMessage(InputStream in,
int size)
Read in the payload part of the message (after the initial 4 byte size and 1
byte type)
|
protected byte[] |
doWriteMessage()
Write out the payload part of the message (not including the 4 byte size and
1 byte type)
|
int |
getAuthType()
Gets the authentication type.
|
BlindData |
getBlindData()
Gets the computed blind data.
|
String |
getDestination()
Gets the destination for dest-type endpoints.
|
int |
getEndpointType()
Gets the endpoint type.
|
Hash |
getHash()
Gets the hash for hash-type endpoints.
|
String |
getHostname()
Gets the hostname for host-type endpoints.
|
PrivateKey |
getPrivateKey()
Gets the private key for key-type endpoints.
|
String |
getSecret()
Gets the secret for PSK authentication.
|
SessionId |
getSessionId()
Returns the session ID for this message.
|
SigningPublicKey |
getSigningPublicKey()
Gets the signing public key for key-type endpoints.
|
long |
getTimeout()
Gets the timeout for the blinding info.
|
int |
getType()
Return the unique identifier for this type of message, as specified in the
network specification document under #ClientAccessLayerMessages
|
SessionId |
sessionId()
Return the SessionId for this message.
|
String |
toString() |
readBytes, readMessage, readMessage, writeBytes, writeMessagepublic static final int MESSAGE_TYPE
public static final int TYPE_DEST
public static final int TYPE_HASH
public static final int TYPE_HOST
public static final int TYPE_KEY
public BlindingInfoMessage()
public BlindingInfoMessage(BlindData bd, SessionId id)
bd - the blinded dataid - the session IDpublic BlindingInfoMessage(Destination d, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret)
d - the destinationid - the session IDexpiration - ms from now or 0 for foreverauthType - 0 (none), 1 (DH), 3 (PSK)blindType - the blinded signature typeprivKey - null for auth none, non-null for DH/PSKsecret - may be null, 255 UTF-8 bytes maxIllegalArgumentException - on invalid inputspublic BlindingInfoMessage(SigningPublicKey s, SessionId id, int expiration, int authType, SigType blindType, PrivateKey privKey, String secret)
s - the signing public keyid - the session IDexpiration - ms from now or 0 for foreverauthType - 0 (none), 1 (DH), 3 (PSK)blindType - the blinded signature typeprivKey - null for auth none, non-null for DH/PSKsecret - may be null, 255 UTF-8 bytes maxIllegalArgumentException - on invalid inputsprotected void doReadMessage(InputStream in, int size) throws I2CPMessageException, IOException
I2CPMessageImpldoReadMessage in class I2CPMessageImplin - InputStreamsize - payload sizeI2CPMessageException - if the message format is invalidIOException - if there's an error reading from the streamprotected byte[] doWriteMessage()
throws I2CPMessageException,
IOException
I2CPMessageImpldoWriteMessage in class I2CPMessageImplI2CPMessageException - if the message cannot be writtenIOException - if there's an error writing to the streampublic int getAuthType()
public BlindData getBlindData()
public String getDestination()
public int getEndpointType()
public Hash getHash()
public String getHostname()
public PrivateKey getPrivateKey()
public String getSecret()
public SessionId getSessionId()
public SigningPublicKey getSigningPublicKey()
public long getTimeout()
public int getType()
I2CPMessagepublic SessionId sessionId()
sessionId in interface I2CPMessagesessionId in class I2CPMessageImpl