public abstract class ConnectionEncryption
extends java.lang.Object
Constructor and Description |
---|
ConnectionEncryption() |
Modifier and Type | Method and Description |
---|---|
static ConnectionEncryption |
constructInstance(DOConnection conn,
HeaderSet request,
HeaderSet response)
Constructs a ConnectionEncryption instance that conforms to the given
parameters.
|
static java.security.SecureRandom |
getRandom()
Return a singleton SecureRandom object.
|
abstract void |
initParameters(HeaderSet request,
HeaderSet parameters)
Set up the encryption mechanism and put the parameters into the given
HeaderSet so that they can be communicated to the other side.
|
abstract void |
processIncomingChunk(java.nio.ByteBuffer buf)
Decrypts the incoming chunk of bytes and puts the result back into the
given ByteBuffer for reading.
|
abstract java.nio.ByteBuffer |
processOutgoingChunk(java.nio.ByteBuffer buf)
Processes the outgoing chunk of bytes and returns the processed version.
|
public abstract void initParameters(HeaderSet request, HeaderSet parameters) throws java.lang.Exception
java.lang.Exception
public abstract void processIncomingChunk(java.nio.ByteBuffer buf) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public abstract java.nio.ByteBuffer processOutgoingChunk(java.nio.ByteBuffer buf) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
public static ConnectionEncryption constructInstance(DOConnection conn, HeaderSet request, HeaderSet response) throws java.lang.Exception
request
- The parameter set containing input for the encryption setupresponse
- The parameter set where the encryption details will be storedjava.lang.Exception
public static final java.security.SecureRandom getRandom()