Package net.i2p.data

Class Certificate

All Implemented Interfaces:
Serializable, DataStructure
Direct Known Subclasses:
KeyCertificate

public class Certificate extends DataStructureImpl
Defines a certificate that can be attached to various I2P structures, such as RouterIdentity and Destination, allowing routers and clients to help manage denial of service attacks and the network utilization. Certificates can even be defined to include identifiable information signed by some certificate authority, though that use probably isn't appropriate for an anonymous network ;) Todo: Properly support multiple certificates
Author:
jrandom
See Also:
  • Field Details

    • NULL_CERT

      public static final Certificate NULL_CERT
    • _type

      protected int _type
    • _payload

      protected byte[] _payload
    • CERTIFICATE_TYPE_NULL

      public static final int CERTIFICATE_TYPE_NULL
      Specifies a null certificate type with no payload
      See Also:
    • CERTIFICATE_TYPE_HASHCASH

      public static final int CERTIFICATE_TYPE_HASHCASH
      specifies a Hashcash style certificate
      See Also:
    • CERTIFICATE_TYPE_HIDDEN

      public static final int CERTIFICATE_TYPE_HIDDEN
      we should not be used for anything (don't use us in the netDb, in tunnels, or tell others about us)
      See Also:
    • CERTIFICATE_TYPE_SIGNED

      public static final int CERTIFICATE_TYPE_SIGNED
      Signed with 40-byte Signature and (optional) 32-byte hash
      See Also:
    • CERTIFICATE_LENGTH_SIGNED_WITH_HASH

      public static final int CERTIFICATE_LENGTH_SIGNED_WITH_HASH
    • CERTIFICATE_TYPE_MULTIPLE

      public static final int CERTIFICATE_TYPE_MULTIPLE
      Contains multiple certs
      See Also:
    • CERTIFICATE_TYPE_KEY

      public static final int CERTIFICATE_TYPE_KEY
      Since:
      0.9.12
      See Also:
  • Constructor Details

    • Certificate

      public Certificate()
    • Certificate

      public Certificate(int type, byte[] payload)
      Throws:
      IllegalArgumentException - if type < 0
  • Method Details