public final class CipherStatePair extends java.lang.Object implements Destroyable
Constructor and Description |
---|
CipherStatePair(CipherState sender,
CipherState receiver)
Constructs a pair of CipherState objects.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys all sensitive state in the current object.
|
CipherState |
getReceiver()
Gets the CipherState to use to receive packets from the remote party.
|
CipherState |
getSender()
Gets the CipherState to use to send packets to the remote party.
|
void |
receiverOnly()
Destroys the sending CipherState and retains only the receiving CipherState.
|
void |
senderOnly()
Destroys the receiving CipherState and retains only the sending CipherState.
|
void |
swap()
Swaps the sender and receiver.
|
public CipherStatePair(CipherState sender, CipherState receiver)
sender
- The CipherState to use to send packets to the remote party.receiver
- The CipherState to use to receive packets from the remote party.public CipherState getSender()
public CipherState getReceiver()
public void senderOnly()
public void receiverOnly()
public void swap()
public void destroy()
Destroyable
destroy
in interface Destroyable