net.i2p.data

## Class Signature

- java.lang.Object
- - net.i2p.data.DataStructureImpl
  - - net.i2p.data.SimpleDataStructure
    - - net.i2p.data.Signature

All Implemented Interfaces:
  DataStructure

    public class Signature
    extends SimpleDataStructure

Defines the signature as defined by the I2P data structure spec. 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.

Author:
  jrandom

### Field Summary

Fields
`static byte[]` `FAKE_SIGNATURE` all zeros
`static int` `SIGNATURE_BYTES`

### Fields inherited from class net.i2p.data.SimpleDataStructure

`_data, _length`

### Constructor Summary

Constructors
Constructor and Description
`Signature()`
`Signature(byte[] data)`

### Method Summary

Methods
`int` `length()` The legal length of the byte array in this data structure

### Methods inherited from class net.i2p.data.SimpleDataStructure

`calculateHash, equals, fromBase64, fromByteArray, getData, hashCode, readBytes, setData, toBase64, toByteArray, toString, writeBytes`

### Methods inherited from class net.i2p.data.DataStructureImpl

`read`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### SIGNATURE_BYTES

    public static final int SIGNATURE_BYTES

See Also:
  Constant Field Values

#### FAKE_SIGNATURE

    public static final byte[] FAKE_SIGNATURE

all zeros

### Constructor Detail

#### Signature

    public Signature()

#### Signature

    public Signature(byte[] data)

### Method Detail

#### length

    public int length()

Description copied from class: `SimpleDataStructure`
The legal length of the byte array in this data structure

Specified by:
  `length` in class `SimpleDataStructure`