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, stripLeadingZeroes
public static final String KEX_TYPE
public DHG(Factory<? extends Digest> digestFactory, BigInteger pValue, BigInteger gValue) throws Exception
Exception
protected byte[] calculateE() throws Exception
AbstractDH
AbstractDH.getE()
if the public key data has not
been generated yet.calculateE
in class AbstractDH
Exception
- If failed to generate the relevant dataprotected byte[] calculateK() throws Exception
AbstractDH
AbstractDH.getK()
if the shared secret data has
not been calculated yetcalculateK
in class AbstractDH
Exception
- If failed to calculate itpublic void setP(byte[] p)
public void setG(byte[] g)
public void setF(byte[] f)
setF
in class AbstractDH
public 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 AbstractDH
Exception
public String toString()
toString
in class AbstractDH
Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.