|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ssonet.mechanisms.accountability.AbstractAccountabilityMechanism
Field Summary | |
protected boolean |
debug
|
protected boolean |
EOF
|
protected org.ssonet.util.ByteFIFO |
inBuffer
|
protected static int |
INBUFFER_SIZE
|
protected org.ssonet.io.IOStream |
ioStream
|
protected int[] |
keyLengths
|
protected java.lang.String |
mechanismName
|
protected byte[] |
messageBuffer
|
protected java.lang.String[] |
modes
|
protected org.ssonet.mechanisms.MechanismConfiguration |
negotiatedMechConf
|
protected java.lang.String[] |
providers
|
protected int |
readBlockNumber
|
protected java.io.IOException |
readException
|
protected int |
readMode
|
protected int[] |
rounds
|
protected int |
securityGoal
|
protected byte[] |
signatureBuffer
|
protected java.security.Signature |
signatureIn
|
protected java.security.Signature |
signatureOut
|
protected int |
validBytesToRead
|
protected java.lang.String[] |
variants
|
protected int |
writeBlockNumber
|
Fields inherited from interface org.ssonet.net.Mechanism |
KEYLENGTH, MODES, PROVIDERLIST, ROUNDS, VARIANTS |
Constructor Summary | |
AbstractAccountabilityMechanism()
|
Method Summary | |
int |
available()
|
void |
closeIn()
Closes the inputStream of the IOStream |
void |
closeOut()
Closes the outputStream of the IOStream. |
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)
Initialize without key exchange |
void |
init(org.ssonet.io.IOStream ioStream,
int securityGoal,
org.ssonet.mechanisms.MechanismConfiguration ownMechanismConfiguration,
org.ssonet.mechanisms.MechanismConfiguration partnerMechanismConfiguration,
org.ssonet.net.KeyExchange keyExchange)
Initialize with key exchange |
protected void |
initIOStream()
Initializes the data fields needed for the IOStream to work. |
int |
read(byte[] buffer)
reads an array of bytes from the IOStream |
byte[] |
testDecrypt(byte[] buffer)
Checking a signature |
byte[] |
testEncrypt(byte[] buffer)
Signing a byte array |
void |
write(byte[] buffer)
Writes an array of bytes to the IOStream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean debug
protected java.lang.String mechanismName
protected int[] keyLengths
protected java.lang.String[] modes
protected java.lang.String[] providers
protected int[] rounds
protected java.lang.String[] variants
protected java.security.Signature signatureIn
protected java.security.Signature signatureOut
protected org.ssonet.io.IOStream ioStream
protected int securityGoal
protected org.ssonet.mechanisms.MechanismConfiguration negotiatedMechConf
protected org.ssonet.util.ByteFIFO inBuffer
protected static int INBUFFER_SIZE
protected byte[] messageBuffer
protected byte[] signatureBuffer
protected boolean EOF
protected java.io.IOException readException
protected int validBytesToRead
protected int readMode
protected int readBlockNumber
protected int writeBlockNumber
Constructor Detail |
public AbstractAccountabilityMechanism()
Method Detail |
public int available() throws java.io.IOException
available
in interface IOStream
java.io.IOException
public void closeIn() throws java.io.IOException
closeIn
in interface IOStream
java.io.IOException
public void closeOut() throws java.io.IOException
closeOut
in interface IOStream
java.io.IOException
public org.ssonet.mechanisms.MechanismConfiguration getDefaultConfiguration()
getDefaultConfiguration
in interface Mechanism
public void init(org.ssonet.io.IOStream ioStream, int securityGoal, org.ssonet.mechanisms.MechanismConfiguration ownMechanismConfiguration)
init
in interface Mechanism
ioStream
- mechanism IOStreamsecurityGoal
- the security goal, for which the algorithm is usedownMechanismConfiguration
- own mechanism configurationpublic 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 ParameterNotCompatibleException
init
in interface Mechanism
ioStream
- mechanism IOStreamsecurityGoal
- the security goal, for which the algorithm is usedownMechanismConfiguration
- own mechanism configurationpartnerMechanismConfiguration
- partner mechanism configurationkeyExchange
- prepared key exchange protocol
ParameterNotCompatibleException
public byte[] testEncrypt(byte[] buffer)
testEncrypt
in interface Mechanism
buffer
- the buffer to apply the mechanism to
public byte[] testDecrypt(byte[] buffer)
testDecrypt
in interface Mechanism
buffer
- the buffer to apply the mechanism to
public int read(byte[] buffer) throws java.io.IOException
read
in interface IOStream
buffer
- the buffer to be filled during the read operation
java.io.IOException
- if an error occures while reading from the IOStreampublic void write(byte[] buffer) throws java.io.IOException
write
in interface IOStream
buffer
- the byte array to write to the stream (signed)
java.io.IOException
- if something went wrong while writing to the ioStreamprotected void initIOStream()
public org.ssonet.mechanisms.MechanismConfiguration getConfiguration()
getConfiguration
in interface Mechanism
init
methods, or null
if the mechanism was not allready initialized.public java.lang.String[] getModes()
getModes
in interface Mechanism
public java.lang.String[] getProviders()
getProviders
in interface Mechanism
public java.lang.String[] getVariants()
getVariants
in interface Mechanism
public int[] getKeyLengths()
getKeyLengths
in interface Mechanism
public int[] getRounds()
getRounds
in interface Mechanism
public java.lang.String getName()
getName
in interface Mechanism
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |