public class ECDH extends AbstractDH
Modifier and Type | Field and Description |
---|---|
static String |
KEX_TYPE |
myKeyAgree
Constructor and Description |
---|
ECDH() |
ECDH(ECCurves curve) |
ECDH(ECParameterSpec paramSpec) |
ECDH(String curveName) |
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 |
Digest |
getHash() |
void |
setCurveParameters(ECParameterSpec paramSpec) |
void |
setF(byte[] f) |
String |
toString() |
checkKeyAgreementNecessity, getE, getK, isPublicDataAvailable, isSharedSecretAvailable, stripLeadingZeroes
public static final String KEX_TYPE
public ECDH(ECParameterSpec paramSpec) 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 setCurveParameters(ECParameterSpec paramSpec)
public void setF(byte[] f)
setF
in class AbstractDH
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.