public final class I2PDatagramDissector extends Object
| Constructor and Description |
|---|
I2PDatagramDissector()Crate a new I2P repliable datagram dissector. |
| Modifier and Type | Method and Description |
|---|---|
Hash | extractHash()Extract the hash of the payload of an I2P repliable datagram (previously
loaded with the loadI2PDatagram() method), without verifying the datagram
signature. |
byte[] | extractPayload()Extract the payload carried by an I2P repliable datagram (previously
loaded with the loadI2PDatagram() method), without verifying the
datagram signature. |
Destination | extractSender()Extract the sender of an I2P repliable datagram (previously loaded with
the loadI2PDatagram() method), without verifying the datagram signature. |
Hash | getHash()Extract the hash of the payload of an I2P repliable datagram (previously
loaded with the loadI2PDatagram() method), verifying the datagram
signature. |
byte[] | getPayload()Get the payload carried by an I2P repliable datagram (previously loaded
with the loadI2PDatagram() method), verifying the datagram signature. |
Destination | getSender()Get the sender of an I2P repliable datagram (previously loaded with the
loadI2PDatagram() method), verifying the datagram signature. |
void | loadI2PDatagram(byte[] dgram)Load an I2P repliable datagram into the dissector. |
void | verifySignature()Verify the signature of this datagram (previously loaded with the
loadI2PDatagram() method) |
public I2PDatagramDissector()
public Hash extractHash()
public byte[] extractPayload()
public Destination extractSender()
public Hash getHash() throws I2PInvalidDatagramException
I2PInvalidDatagramException - if the signature verification failspublic byte[] getPayload()
throws I2PInvalidDatagramExceptionI2PInvalidDatagramException - if the signature verification failspublic Destination getSender() throws I2PInvalidDatagramException
I2PInvalidDatagramException - if the signature verification failspublic void loadI2PDatagram(byte[] dgram)
throws DataFormatExceptiondgram - non-null I2P repliable datagram to be loadedDataFormatException - If there's an error in the datagram formatpublic void verifySignature()
throws I2PInvalidDatagramExceptionI2PInvalidDatagramException - if the signature is invalid