Class BlindingInfoMessage

java.lang.Object
net.i2p.data.i2cp.I2CPMessageImpl
net.i2p.data.i2cp.BlindingInfoMessage
All Implemented Interfaces:
I2CPMessage

public class BlindingInfoMessage extends I2CPMessageImpl
Advise the router that the endpoint is blinded. Client to router. There is no reply. Preliminary - subject to change - See proposal 123.
Since:
0.9.43; do not send to routers older than 0.9.43.
See Also:
  • Field Details

  • Constructor Details

    • BlindingInfoMessage

      public BlindingInfoMessage()
    • BlindingInfoMessage

      public BlindingInfoMessage(BlindData bd, SessionId id)
      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 side
      HASH not supported by router and may not be useful
      Parameters:
      expiration - ms from now or 0 for forever
      authType - 0 (none), 1 (DH), 3 (PSK)
      privKey - null for auth none, non-null for DH/PSK
      secret - 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 side
      HOST not supported by router and may not be useful
      Parameters:
      h - hostname
      expiration - ms from now or 0 for forever
      authType - 0 (none), 1 (DH), 3 (PSK)
      privKey - null for auth none, non-null for DH/PSK
      secret - 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 forever
      authType - 0 (none), 1 (DH), 3 (PSK)
      privKey - null for auth none, non-null for DH/PSK
      secret - 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 forever
      authType - 0 (none), 1 (DH), 3 (PSK)
      privKey - null for auth none, non-null for DH/PSK
      secret - may be null, 255 UTF-8 bytes max
  • Method Details

    • getSessionId

      public SessionId getSessionId()
    • sessionId

      public SessionId sessionId()
      Return the SessionId for this message.
      Specified by:
      sessionId in interface I2CPMessage
      Overrides:
      sessionId in class I2CPMessageImpl
      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

      public Hash getHash()
      Returns:
      only valid if endpoint type == 0 or 2
    • getHostname

      public String getHostname()
      Returns:
      only valid if endpoint type == 1
    • getDestination

      public String getDestination()
      Returns:
      only valid if endpoint type == 2
    • getSigningPublicKey

      public SigningPublicKey getSigningPublicKey()
      Returns:
      only valid if endpoint type == 2 or 3
    • getPrivateKey

      public PrivateKey getPrivateKey()
      Returns:
      private key or null
    • getSecret

      public String getSecret()
      Returns:
      secret or null
    • getBlindData

      public BlindData getBlindData()
      Returns:
      blind data or null if not enough info
    • doReadMessage

      protected void doReadMessage(InputStream in, int size) throws I2CPMessageException, IOException
      Description copied from class: I2CPMessageImpl
      Read in the payload part of the message (after the initial 4 byte size and 1 byte type)
      Specified by:
      doReadMessage in class I2CPMessageImpl
      Parameters:
      in - InputStream
      size - payload size
      Throws:
      I2CPMessageException
      IOException
    • doWriteMessage

      protected byte[] doWriteMessage() throws I2CPMessageException, IOException
      Description copied from class: I2CPMessageImpl
      Write out the payload part of the message (not including the 4 byte size and 1 byte type)
      Specified by:
      doWriteMessage in class I2CPMessageImpl
      Returns:
      byte array
      Throws:
      I2CPMessageException
      IOException
    • getType

      public int getType()
      Description copied from interface: I2CPMessage
      Return 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

      public String toString()
      Overrides:
      toString in class Object