Package net.i2p.data

Class Signature

All Implemented Interfaces:
DataStructure

public class Signature
extends SimpleDataStructure
Defines the signature as defined by the I2P data structure spec. By default, a signature is a 40-byte array verifying the authenticity of some data using the DSA-SHA1 algorithm. The signature is the 20-byte R followed by the 20-byte S, both are unsigned integers. As of release 0.9.8, signatures of arbitrary length and type are supported. See SigType.
Author:
jrandom
  • Field Details

  • Constructor Details

    • Signature

      public Signature()
    • Signature

      public Signature​(SigType type)
      Unknown type not allowed as we won't know the length to read in the data.
      Parameters:
      type - non-null
      Since:
      0.9.8
    • Signature

      public Signature​(byte[] data)
    • Signature

      public Signature​(SigType type, byte[] data)
      Should we allow an unknown type here?
      Parameters:
      type - non-null
      Since:
      0.9.8
  • Method Details