## net.i2p.data
Class SigningPublicKey

    java.lang.Object
      net.i2p.data.DataStructureImpl
          net.i2p.data.SimpleDataStructure
              net.i2p.data.SigningPublicKey

All Implemented Interfaces:
  DataStructure

    public class SigningPublicKey

extends SimpleDataStructure

Defines the SigningPublicKey as defined by the I2P data structure spec. A public key is 256byte Integer. The public key represents only the exponent, not the primes, which are constant and defined in the crypto spec. This key varies from the PrivateKey in its usage (verifying signatures, not encrypting)

Author:
  jrandom

Field Summary
`static int` `KEYSIZE_BYTES`

Fields inherited from class net.i2p.data.SimpleDataStructure
`_data, _length`

Constructor Summary
`SigningPublicKey()`
`SigningPublicKey(byte[] data)`
`SigningPublicKey(String base64Data)` constructs from base64

Method Summary
`static SigningPublicKey` `create(byte[] data, int off)` Pull from cache or return new
`static SigningPublicKey` `create(InputStream in)` Pull from cache or return new
`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

### KEYSIZE_BYTES

    public static final int KEYSIZE_BYTES

See Also:
  Constant Field Values

Constructor Detail

### SigningPublicKey

    public SigningPublicKey()

### SigningPublicKey

    public SigningPublicKey(byte[] data)

### SigningPublicKey

    public SigningPublicKey(String base64Data)
                     throws DataFormatException

  constructs from base64

  Parameters:
    `base64Data` - a string of base64 data (the output of .toBase64() called on a prior instance of SigningPublicKey
  Throws:
    `DataFormatException`

Method Detail

### create

    public static SigningPublicKey create(byte[] data,
                                          int off)

  Pull from cache or return new

  Throws:
    `AIOOBE` - if not enough bytes
  Since:
    0.8.3

### create

    public static SigningPublicKey create(InputStream in)
                                   throws IOException

  Pull from cache or return new

  Throws:
    `IOException`
  Since:
    0.8.3

### 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`