|
|||||||||
Home >> All >> gnu >> javax >> crypto >> [ key overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
gnu.javax.crypto.key
Class BaseKeyAgreementParty

java.lang.Objectgnu.javax.crypto.key.BaseKeyAgreementParty
- All Implemented Interfaces:
- IKeyAgreementParty
- public abstract class BaseKeyAgreementParty
- extends java.lang.Object
- implements IKeyAgreementParty
- extends java.lang.Object
A base abstract class to facilitate implementations of concrete key agreement protocol handlers.
Field Summary | |
protected boolean |
complete
Whether the exchange has concluded or not. |
protected boolean |
initialised
Whether the instance is initialised or not. |
protected gnu.java.security.prng.IRandom |
irnd
The optional gnu.java.security.prng.IRandom instance to use. |
protected java.lang.String |
name
The canonical name of the protocol. |
private gnu.java.security.util.PRNG |
prng
Our default source of randomness. |
protected java.security.SecureRandom |
rnd
The optional java.security.SecureRandom instance to use. |
protected int |
step
The current step index of the protocol exchange. |
protected static java.math.BigInteger |
TWO
|
Constructor Summary | |
protected |
BaseKeyAgreementParty(java.lang.String name)
|
Method Summary | |
protected abstract void |
engineInit(java.util.Map attributes)
|
protected abstract OutgoingMessage |
engineProcessMessage(IncomingMessage in)
|
protected abstract void |
engineReset()
|
protected abstract byte[] |
engineSharedSecret()
|
private gnu.java.security.util.PRNG |
getDefaultPRNG()
|
byte[] |
getSharedSecret()
Returns the byte array containing the shared secret as generated by this party. |
void |
init(java.util.Map attributes)
Sets up the instance to operate with specific attributes. |
boolean |
isComplete()
Returns true if the party in the key agreement protocol
exchange has completed its part of the exchange. |
java.lang.String |
name()
Returns the canonical name of the key agreement protocol. |
protected void |
nextRandomBytes(byte[] buffer)
Fills the designated byte array with random data. |
OutgoingMessage |
processMessage(IncomingMessage in)
Processes an incoming message at one end, generating a message that will be processed by the other party(ies). |
void |
reset()
Resets this instance for re-use with another set of attributes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
TWO
protected static final java.math.BigInteger TWO
name
protected java.lang.String name
- The canonical name of the protocol.
initialised
protected boolean initialised
- Whether the instance is initialised or not.
step
protected int step
- The current step index of the protocol exchange.
complete
protected boolean complete
- Whether the exchange has concluded or not.
rnd
protected java.security.SecureRandom rnd
- The optional java.security.SecureRandom instance to use.
irnd
protected gnu.java.security.prng.IRandom irnd
- The optional gnu.java.security.prng.IRandom instance to use.
prng
private gnu.java.security.util.PRNG prng
- Our default source of randomness.
Constructor Detail |
BaseKeyAgreementParty
protected BaseKeyAgreementParty(java.lang.String name)
Method Detail |
name
public java.lang.String name()
- Description copied from interface:
IKeyAgreementParty
Returns the canonical name of the key agreement protocol.
- Specified by:
name
in interfaceIKeyAgreementParty
init
public void init(java.util.Map attributes) throws KeyAgreementException
- Description copied from interface:
IKeyAgreementParty
Sets up the instance to operate with specific attributes.
- Specified by:
init
in interfaceIKeyAgreementParty
processMessage
public OutgoingMessage processMessage(IncomingMessage in) throws KeyAgreementException
- Description copied from interface:
IKeyAgreementParty
Processes an incoming message at one end, generating a message that will be processed by the other party(ies).
- Specified by:
processMessage
in interfaceIKeyAgreementParty
isComplete
public boolean isComplete()
- Description copied from interface:
IKeyAgreementParty
Returns
true
if the party in the key agreement protocol exchange has completed its part of the exchange. If this is the case an java.lang.IllegalStateException is thrown for any method invocation exceptinit()
orreset()
.- Specified by:
isComplete
in interfaceIKeyAgreementParty
getSharedSecret
public byte[] getSharedSecret() throws KeyAgreementException
- Description copied from interface:
IKeyAgreementParty
Returns the byte array containing the shared secret as generated by this party.
- Specified by:
getSharedSecret
in interfaceIKeyAgreementParty
reset
public void reset()
- Description copied from interface:
IKeyAgreementParty
- Resets this instance for re-use with another set of attributes.
- Specified by:
reset
in interfaceIKeyAgreementParty
engineInit
protected abstract void engineInit(java.util.Map attributes) throws KeyAgreementException
engineProcessMessage
protected abstract OutgoingMessage engineProcessMessage(IncomingMessage in) throws KeyAgreementException
engineSharedSecret
protected abstract byte[] engineSharedSecret() throws KeyAgreementException
engineReset
protected abstract void engineReset()
nextRandomBytes
protected void nextRandomBytes(byte[] buffer)
- Fills the designated byte array with random data.
getDefaultPRNG
private gnu.java.security.util.PRNG getDefaultPRNG()
|
|||||||||
Home >> All >> gnu >> javax >> crypto >> [ key overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |