Serializable, DataStructureDestination, RouterIdentitypublic class KeysAndCert extends DataStructureImpl
| Modifier and Type | Field | Description |
|---|---|---|
protected Certificate |
_certificate |
|
protected byte[] |
_padding |
|
protected PublicKey |
_publicKey |
|
protected SigningPublicKey |
_signingKey |
| Constructor | Description |
|---|---|
KeysAndCert() |
| Modifier and Type | Method | Description |
|---|---|---|
Hash |
calculateHash() |
Throws IllegalStateException if keys and cert are not initialized,
as of 0.9.12.
|
boolean |
equals(Object object) |
|
Certificate |
getCertificate() |
|
Hash |
getHash() |
Throws IllegalStateException if keys and cert are not initialized,
as of 0.9.12.
|
byte[] |
getPadding() |
|
PublicKey |
getPublicKey() |
|
SigningPublicKey |
getSigningPublicKey() |
|
SigType |
getSigType() |
|
int |
hashCode() |
the signing key has enough randomness in it to use it by itself for speed
|
void |
readBytes(InputStream in) |
Load up the current object with data from the given stream.
|
void |
setCertificate(Certificate cert) |
|
void |
setPadding(byte[] padding) |
|
void |
setPublicKey(PublicKey key) |
|
void |
setSigningPublicKey(SigningPublicKey key) |
|
String |
toString() |
|
void |
writeBytes(OutputStream out) |
Write out the data structure to the stream, using the format defined in the
I2P data structure specification.
|
fromBase64, fromByteArray, read, toBase64, toByteArrayprotected PublicKey _publicKey
protected SigningPublicKey _signingKey
protected Certificate _certificate
protected byte[] _padding
public Certificate getCertificate()
public void setCertificate(Certificate cert)
IllegalStateException - if was already setpublic SigType getSigType()
public PublicKey getPublicKey()
public void setPublicKey(PublicKey key)
IllegalStateException - if was already setpublic SigningPublicKey getSigningPublicKey()
public void setSigningPublicKey(SigningPublicKey key)
IllegalStateException - if was already setpublic byte[] getPadding()
public void setPadding(byte[] padding)
IllegalStateException - if was already setpublic void readBytes(InputStream in) throws DataFormatException, IOException
DataStructurein - stream to read fromIllegalStateException - if data already setDataFormatException - if the data is improperly formattedIOException - if there was a problem reading the streampublic void writeBytes(OutputStream out) throws DataFormatException, IOException
DataStructureout - stream to write toDataFormatException - if the data was incomplete or not yet ready to be writtenIOException - if there was a problem writing to the streampublic int hashCode()
public Hash calculateHash()
calculateHash in interface DataStructurecalculateHash in class DataStructureImplIllegalStateExceptionpublic Hash getHash()
IllegalStateException