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
Method Summary |
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 |
SIGNATURE_BYTES
public static final int SIGNATURE_BYTES
- See Also:
- Constant Field Values
FAKE_SIGNATURE
public static final byte[] FAKE_SIGNATURE
- all zeros
Signature
public Signature()
Signature
public Signature(byte[] data)
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