|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface for a security mechanism applying security modifications to the allready open stream.
Field Summary | |
static java.lang.String |
KEYLENGTH
|
static java.lang.String |
MODES
|
static java.lang.String |
PROVIDERLIST
|
static java.lang.String |
ROUNDS
|
static java.lang.String |
VARIANTS
|
Method Summary | |
org.ssonet.mechanisms.MechanismConfiguration |
getConfiguration()
|
org.ssonet.mechanisms.MechanismConfiguration |
getDefaultConfiguration()
|
int[] |
getKeyLengths()
|
java.lang.String[] |
getModes()
|
java.lang.String |
getName()
|
java.lang.String[] |
getProviders()
|
int[] |
getRounds()
|
java.lang.String[] |
getVariants()
|
void |
init(org.ssonet.io.IOStream ioStream,
int securityGoal,
org.ssonet.mechanisms.MechanismConfiguration ownMechanismConfiguration)
Initializes the mechanism for securing the ioStream without interactive initialization steps. |
void |
init(org.ssonet.io.IOStream ioStream,
int securityGoal,
org.ssonet.mechanisms.MechanismConfiguration ownMechanismConfiguration,
org.ssonet.mechanisms.MechanismConfiguration partnerMechanismConfiguration,
org.ssonet.net.KeyExchange keyExchange)
Initializes the mechanism for securing the ioStream. |
byte[] |
testDecrypt(byte[] buffer)
Applies the mechanism in receiving mode (decrpytion for confidentiality mechanisms) to the specified buffer. |
byte[] |
testEncrypt(byte[] buffer)
Applies the mechanism in sending mode (encryption for confidentiality mechanisms) to the specified buffer. |
Methods inherited from interface org.ssonet.io.IOStream |
available, closeIn, closeOut, read, write |
Field Detail |
public static final java.lang.String KEYLENGTH
public static final java.lang.String PROVIDERLIST
public static final java.lang.String MODES
public static final java.lang.String ROUNDS
public static final java.lang.String VARIANTS
Method Detail |
public java.lang.String getName()
public java.lang.String[] getModes()
public java.lang.String[] getProviders()
public java.lang.String[] getVariants()
public int[] getKeyLengths()
public int[] getRounds()
public org.ssonet.mechanisms.MechanismConfiguration getDefaultConfiguration()
public void init(org.ssonet.io.IOStream ioStream, int securityGoal, org.ssonet.mechanisms.MechanismConfiguration ownMechanismConfiguration)
ioStream
- the stream to securesecurityGoal
- the security goal, for which the mechanism will be appliedownMechanismConfiguration
- the configuration for initializing the mechanismpublic void init(org.ssonet.io.IOStream ioStream, int securityGoal, org.ssonet.mechanisms.MechanismConfiguration ownMechanismConfiguration, org.ssonet.mechanisms.MechanismConfiguration partnerMechanismConfiguration, org.ssonet.net.KeyExchange keyExchange) throws java.lang.Exception
Interactive initialization steps must be carried out using the keyExchange object. The ioStream must not be used for transmitting data in the initialization phase.
ioStream
- the stream to securesecurityGoal
- the security goal, for which the mechanism will be appliedownMechanismConfiguration
- the own configuration for the mechanismpartnerMechanismConfiguration
- the partners configuration for the mechanismkeyExchange
- the object used for interactive initialization steps like the
exchange of keys.
java.lang.Exception
- if something goes wrong during initializationpublic org.ssonet.mechanisms.MechanismConfiguration getConfiguration()
init
methods, or null
if the mechanism was not allready initialized.public byte[] testEncrypt(byte[] buffer)
buffer
- the buffer to apply the mechanism to
public byte[] testDecrypt(byte[] buffer)
buffer
- the buffer to apply the mechanism to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |