|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.data.DataStructureImpl
net.i2p.data.KeysAndCert
net.i2p.data.Destination
public class Destination
Defines an end point in the I2P network. The Destination may move around in the network, but messages sent to the Destination will find it Note that the public (encryption) key is essentially unused, since "end-to-end" encryption was removed in 0.6. The public key in the LeaseSet is used instead. The first bytes of the public key are used for the IV for leaseset encryption, but that encryption is poorly designed and should be deprecated. As of 0.9.9 this data structure is immutable after the two keys and the certificate are set; attempts to change them will throw an IllegalStateException.
Field Summary |
---|
Fields inherited from class net.i2p.data.KeysAndCert |
---|
_certificate, _padding, _publicKey, _signingKey |
Constructor Summary | |
---|---|
Destination()
|
|
Destination(String s)
alternative constructor which takes a base64 string representation |
Method Summary | |
---|---|
static void |
clearCache()
Clear the cache. |
static Destination |
create(InputStream in)
Pull from cache or return new |
boolean |
equals(Object o)
|
int |
hashCode()
the signing key has enough randomness in it to use it by itself for speed |
int |
readBytes(byte[] source,
int offset)
deprecated was used only by Packet.java in streaming, now unused Warning - used by i2p-bote. |
int |
size()
|
String |
toBase32()
For convenience. |
String |
toBase64()
Cache it. |
int |
writeBytes(byte[] target,
int offset)
Deprecated, used only by Packet.java in streaming. |
Methods inherited from class net.i2p.data.KeysAndCert |
---|
calculateHash, getCertificate, getHash, getPadding, getPublicKey, getSigningPublicKey, getSigType, readBytes, setCertificate, setPadding, setPublicKey, setSigningPublicKey, toString, writeBytes |
Methods inherited from class net.i2p.data.DataStructureImpl |
---|
fromBase64, fromByteArray, read, toByteArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Destination()
public Destination(String s) throws DataFormatException
s
- a Base64 representation of the destination, as (eg) is used in hosts.txt
DataFormatException
Method Detail |
---|
public static Destination create(InputStream in) throws DataFormatException, IOException
DataFormatException
IOException
public int writeBytes(byte[] target, int offset)
public int readBytes(byte[] source, int offset) throws DataFormatException
IllegalStateException
- if data already set
DataFormatException
public int size()
public String toBase64()
toBase64
in interface DataStructure
toBase64
in class DataStructureImpl
public String toBase32()
public static void clearCache()
public boolean equals(Object o)
equals
in class KeysAndCert
public int hashCode()
KeysAndCert
hashCode
in class KeysAndCert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |