# Package net.i2p.client.datagram

Provides a standard way for reading and writing messages transferred over I2P so that recipient has an authenticated mechanism to reply to it.

See: Description

- Class Summary
  Class | Description
  --- | ---
  Datagram2 | Class for creating and loading I2P repliable datagrams version 2.
  Datagram3 | Class for creating and loading I2P repliable datagrams version 3.
  I2PDatagramDissector | Class for dissecting I2P repliable datagrams, checking the authenticity of the sender.
  I2PDatagramMaker | Class for creating I2P repliable datagrams.

- Exception Summary
  Exception | Description
  --- | ---
  I2PInvalidDatagramException | Exception thrown when I2P repliable datagram signature verification fails.

## Package net.i2p.client.datagram Description

Provides a standard way for reading and writing messages transferred over I2P so that recipient has an authenticated mechanism to reply to it. This is necessary because the base I2P message sent through `I2PSession.sendMessage(net.i2p.data.Destination, byte[])` has no "from" address, and simply providing a raw "from" address would be insecure as it could be spoofed. An application that needs to know for certain who sent a message to them should use `I2PDatagramDissector` to parse raw message received from `I2PSession`, and in turn, use `I2PDatagramMaker` to build a message that can be parsed.

The datagram format implemented here includes sender's `Destination`, payload, and a signature (signed by the sender's `SigningPrivateKey`). For DSA_SHA1 destinations, the signature is of the SHA-256 Hash of the payload. For other destination types, the signature is of the payload itself.