Class JadexJPakeParticipant
- java.lang.Object
-
- org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
-
- jadex.platform.service.security.auth.JadexJPakeParticipant
-
public class JadexJPakeParticipant extends org.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
Extends the JPAKEParticipant of Bouncy with some functionality.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
derivedkey
The derived key.protected org.bouncycastle.crypto.Digest
digest
Digest.protected static char[]
DUMMY_PW
Empty password for initializing.protected static java.lang.reflect.Field
JPAKE_PW_FIELD
Field access for setting JPAKE password late.
-
Constructor Summary
Constructors Constructor Description JadexJPakeParticipant(java.lang.String participantid, java.lang.String password, org.bouncycastle.crypto.Digest digest)
Create a participant.JadexJPakeParticipant(java.lang.String participantid, org.bouncycastle.crypto.Digest digest)
Create a participant.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigInteger
calculateKeyingMaterial()
Calculates keying material and derives key.void
dispose()
Disposes the exchange.protected void
finalize()
Override.byte[]
getDerivedKey()
Returns the derived key.void
setPassword(byte[] password)
Sets the password after round 1.
-
-
-
Field Detail
-
JPAKE_PW_FIELD
protected static final java.lang.reflect.Field JPAKE_PW_FIELD
Field access for setting JPAKE password late.
-
DUMMY_PW
protected static final char[] DUMMY_PW
Empty password for initializing.
-
digest
protected org.bouncycastle.crypto.Digest digest
Digest.
-
derivedkey
protected byte[] derivedkey
The derived key.
-
-
Constructor Detail
-
JadexJPakeParticipant
public JadexJPakeParticipant(java.lang.String participantid, org.bouncycastle.crypto.Digest digest)
Create a participant.
-
JadexJPakeParticipant
public JadexJPakeParticipant(java.lang.String participantid, java.lang.String password, org.bouncycastle.crypto.Digest digest)
Create a participant.
-
-
Method Detail
-
calculateKeyingMaterial
public java.math.BigInteger calculateKeyingMaterial()
Calculates keying material and derives key.- Overrides:
calculateKeyingMaterial
in classorg.bouncycastle.crypto.agreement.jpake.JPAKEParticipant
-
getDerivedKey
public byte[] getDerivedKey()
Returns the derived key.- Returns:
- The derived key.
-
setPassword
public void setPassword(byte[] password)
Sets the password after round 1.- Parameters:
password
- The password.
-
dispose
public void dispose()
Disposes the exchange.
-
finalize
protected void finalize() throws java.lang.Throwable
Override.- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-