public class DHG extends AbstractDH
| Modifier and Type | Field and Description |
|---|---|
static String |
KEX_TYPE |
myKeyAgree| Constructor and Description |
|---|
DHG(Factory<? extends Digest> digestFactory) |
DHG(Factory<? extends Digest> digestFactory,
BigInteger pValue,
BigInteger gValue) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
calculateE()
Lazy-called by
AbstractDH.getE() if the public key data has not been generated yet. |
protected byte[] |
calculateK()
Lazy-called by
AbstractDH.getK() if the shared secret data has not been calculated yet |
BigInteger |
getG() |
Digest |
getHash() |
BigInteger |
getP() |
void |
setF(BigInteger f) |
void |
setF(byte[] f) |
void |
setG(BigInteger g) |
void |
setG(byte[] g) |
void |
setP(BigInteger p) |
void |
setP(byte[] p) |
String |
toString() |
checkKeyAgreementNecessity, getE, getK, isPublicDataAvailable, isSharedSecretAvailable, stripLeadingZeroespublic static final String KEX_TYPE
public DHG(Factory<? extends Digest> digestFactory, BigInteger pValue, BigInteger gValue) throws Exception
Exceptionprotected byte[] calculateE()
throws Exception
AbstractDHAbstractDH.getE() if the public key data has not been generated yet.calculateE in class AbstractDHException - If failed to generate the relevant dataprotected byte[] calculateK()
throws Exception
AbstractDHAbstractDH.getK() if the shared secret data has not been calculated yetcalculateK in class AbstractDHException - If failed to calculate itpublic void setP(byte[] p)
public void setG(byte[] g)
public void setF(byte[] f)
setF in class AbstractDHpublic BigInteger getP()
public void setP(BigInteger p)
public BigInteger getG()
public void setG(BigInteger g)
public void setF(BigInteger f)
public Digest getHash() throws Exception
getHash in class AbstractDHExceptionpublic String toString()
toString in class AbstractDHCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.