Class 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:
    BlindData, Blinding
    • Constructor Detail

      • 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:
        authType - 0 (none), 1 (DH), 3 (PSK)
        expiration - ms from now or 0 for forever
        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
        authType - 0 (none), 1 (DH), 3 (PSK)
        expiration - ms from now or 0 for forever
        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:
        authType - 0 (none), 1 (DH), 3 (PSK)
        expiration - ms from now or 0 for forever
        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:
        authType - 0 (none), 1 (DH), 3 (PSK)
        expiration - ms from now or 0 for forever
        privKey - null for auth none, non-null for DH/PSK
        secret - may be null, 255 UTF-8 bytes max
    • Method Detail

      • getSessionId

        public SessionId getSessionId()
      • 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
      • 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