## Uses of Interface
com.southernstorm.noise.protocol.CipherState

- Packages that use CipherState
  Package | Description
  --- | ---
  com.southernstorm.noise.protocol | Provides classes for communicating via the Noise protocol.
  net.i2p.router.transport.ntcp | The NTCP (New TCP) transport for I2P, allowing I2P messages to be passed over TCP connections.
  net.i2p.router.transport.udp | The UDP transport (also known as 'SSU' or Secure Semi-reliable UDP transport) for I2P, allowing I2P messages to be passed over UDP connections.

- - ### Uses of CipherState in com.southernstorm.noise.protocol

    Classes in com.southernstorm.noise.protocol that implement CipherState
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ChaChaPolyCipherState` Implements the ChaChaPoly cipher for Noise.

    Methods in com.southernstorm.noise.protocol that return CipherState
    Modifier and Type | Method and Description
    --- | ---
    `CipherState` | CipherState.`clone()` I2P
    `static CipherState` | Noise.`createCipher(String name)` Creates a cipher object from its Noise protocol name.
    `CipherState` | CipherState.`fork(byte[] key, int offset)` Creates a new instance of this cipher and initializes it with a key.
    `CipherState` | ChaChaPolyCipherState.`fork(byte[] key, int offset)`
    `CipherState` | CipherStatePair.`getReceiver()` Gets the CipherState to use to receive packets from the remote party.
    `CipherState` | CipherStatePair.`getSender()` Gets the CipherState to use to send packets to the remote party.

    Constructors in com.southernstorm.noise.protocol with parameters of type CipherState
    Constructor and Description
    `CipherStatePair(CipherState sender, CipherState receiver)` Constructs a pair of CipherState objects.

  - ### Uses of CipherState in net.i2p.router.transport.ntcp

    Methods in net.i2p.router.transport.ntcp with parameters of type CipherState
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | NTCPConnection.`failInboundEstablishment(CipherState sender, byte[] sip_ba, int reason)` We are Bob.
    `(package private) void` | NTCPConnection.`finishInboundEstablishment(CipherState sender, CipherState receiver, byte[] sip_ba, byte[] sip_ab, long clockSkew, NTCP2Options hisPadding)` We are Bob.
    `(package private) void` | NTCPConnection.`finishOutboundEstablishment(CipherState sender, CipherState receiver, byte[] sip_ab, byte[] sip_ba, long clockSkew)` We are Alice.

  - ### Uses of CipherState in net.i2p.router.transport.udp

    Methods in net.i2p.router.transport.udp that return CipherState
    Modifier and Type | Method and Description
    --- | ---
    `(package private) CipherState` | PeerState2.`getRcvCipher()`
    `CipherState` | SSU2Sender.`getSendCipher()`
    `CipherState` | PeerStateDestroyed.`getSendCipher()`
    `CipherState` | PeerState2.`getSendCipher()` Caller must sync on returned object when encrypting

    Constructors in net.i2p.router.transport.udp with parameters of type CipherState
    Constructor and Description
    `PeerState2(RouterContext ctx, UDPTransport transport, InetSocketAddress remoteAddress, Hash remotePeer, boolean isInbound, int rtt, CipherState sendCha, CipherState rcvCha, long sendID, long rcvID, byte[] sendHdrKey1, byte[] sendHdrKey2, byte[] rcvHdrKey2)` If inbound, caller MUST immediately call setWeRelayToThemAs() (if nonzero) and sendAck0().
    `PeerStateDestroyed(RouterContext ctx, UDPTransport transport, RemoteHostId id, long sendID, long rcvID, CipherState sendCha, CipherState rcvCha, byte[] sendKey1, byte[] sendKey2, byte[] rcvKey2, int reason)` Direct from IES2, there was never a PS2.