public class GarlicClove extends DataStructureImpl
| Constructor and Description |
|---|
GarlicClove(I2PAppContext context)GarlicClove. |
| Modifier and Type | Method and Description |
|---|---|
boolean | equals(Object obj)Compare all clove fields for equality. |
int | estimateSize()Estimated serialized length of this clove. |
Certificate | getCertificate()Certificate authorizing delivery of this clove. |
long | getCloveId()Unique identifier for this clove. |
I2NPMessage | getData()The message payload wrapped in this clove. |
long | getExpiration()Time after which this clove expires. |
DeliveryInstructions | getInstructions()How and where to deliver this clove. |
int | getSizeRatchet()Size of the ratchet-format clove. |
int | hashCode()Hash code covering all clove fields. |
int | readBytes(byte[] source,
int offset)Read the clove from a byte array. |
void | readBytesRatchet(byte[] source,
int offset,
int len)Short format for ECIES-Ratchet, saves 22 bytes. |
void | setCertificate(Certificate cert)Certificate authorizing delivery of this clove. |
void | setCloveId(long id)Unique identifier for this clove. |
void | setData(I2NPMessage msg)Message payload wrapped in this clove. |
void | setExpiration(long exp)Time after which this clove expires. |
void | setInstructions(DeliveryInstructions instr)Delivery instructions for this clove. |
byte[] | toByteArray()Serialized clove. |
String | toString()String form for debugging, showing the instructions, expiration, and data. |
int | writeBytesRatchet(byte[] tgt,
int offset)Short format for ECIES-Ratchet, saves 22 bytes. |
calculateHash, fromBase64, fromByteArray, read, toBase64clone, finalize, getClass, notify, notifyAll, wait, wait, waitreadBytes, writeBytespublic GarlicClove(I2PAppContext context)
public boolean equals(Object obj)
public int estimateSize()
public Certificate getCertificate()
public long getCloveId()
public I2NPMessage getData()
public long getExpiration()
public DeliveryInstructions getInstructions()
public int getSizeRatchet()
public int hashCode()
public int readBytes(byte[] source,
int offset)
throws DataFormatExceptionDataFormatExceptionpublic void readBytesRatchet(byte[] source,
int offset,
int len)
throws DataFormatExceptionDataFormatExceptionpublic void setCertificate(Certificate cert)
public void setCloveId(long id)
public void setData(I2NPMessage msg)
public void setExpiration(long exp)
public void setInstructions(DeliveryInstructions instr)
public byte[] toByteArray()
toByteArray in interface DataStructuretoByteArray in class DataStructureImplpublic String toString()
public int writeBytesRatchet(byte[] tgt,
int offset)