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, stripLeadingZeroespublic static final String KEX_TYPE
public ECDH(ECParameterSpec paramSpec) 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 setCurveParameters(ECParameterSpec paramSpec)
public void setF(byte[] f)
setF in class AbstractDHpublic Digest getHash() throws Exception
getHash in class AbstractDHExceptionpublic String toString()
toString in class AbstractDHCopyright © 2008–2020 The Apache Software Foundation. All rights reserved.