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 void loadI2PDatagram(byte[] dgram) throws DataFormatException
dgram
- non-null I2P repliable datagram to be loadedDataFormatException
- If there's an error in the datagram formatpublic byte[] getPayload() throws I2PInvalidDatagramException
I2PInvalidDatagramException
- if the signature verification failspublic Destination getSender() throws I2PInvalidDatagramException
I2PInvalidDatagramException
- if the signature verification failspublic Hash getHash() throws I2PInvalidDatagramException
I2PInvalidDatagramException
- if the signature verification failspublic byte[] extractPayload()
public Destination extractSender()
public Hash extractHash()
public void verifySignature() throws I2PInvalidDatagramException
I2PInvalidDatagramException
- if the signature is invalid