public class JceTlsDHDomain extends java.lang.Object implements TlsDHDomain
| Modifier and Type | Field and Description |
|---|---|
protected JcaTlsCrypto |
crypto |
protected TlsDHConfig |
dhConfig |
protected javax.crypto.spec.DHParameterSpec |
dhParameterSpec |
| Constructor and Description |
|---|
JceTlsDHDomain(JcaTlsCrypto crypto,
TlsDHConfig dhConfig) |
| Modifier and Type | Method and Description |
|---|---|
JceTlsSecret |
calculateDHAgreement(javax.crypto.interfaces.DHPrivateKey privateKey,
javax.crypto.interfaces.DHPublicKey publicKey) |
TlsAgreement |
createDH()
Return an agreement operator suitable for ephemeral Diffie-Hellman.
|
static java.math.BigInteger |
decodeParameter(byte[] encoding) |
javax.crypto.interfaces.DHPublicKey |
decodePublicKey(byte[] encoding) |
byte[] |
encodeParameter(java.math.BigInteger x) |
byte[] |
encodePublicKey(javax.crypto.interfaces.DHPublicKey publicKey) |
java.security.KeyPair |
generateKeyPair() |
static javax.crypto.spec.DHParameterSpec |
getParameters(TlsDHConfig dhConfig) |
protected final JcaTlsCrypto crypto
protected final TlsDHConfig dhConfig
protected final javax.crypto.spec.DHParameterSpec dhParameterSpec
public JceTlsDHDomain(JcaTlsCrypto crypto, TlsDHConfig dhConfig)
public static javax.crypto.spec.DHParameterSpec getParameters(TlsDHConfig dhConfig)
public JceTlsSecret calculateDHAgreement(javax.crypto.interfaces.DHPrivateKey privateKey, javax.crypto.interfaces.DHPublicKey publicKey) throws java.io.IOException
java.io.IOExceptionpublic TlsAgreement createDH()
TlsDHDomaincreateDH in interface TlsDHDomainpublic static java.math.BigInteger decodeParameter(byte[] encoding)
throws java.io.IOException
java.io.IOExceptionpublic javax.crypto.interfaces.DHPublicKey decodePublicKey(byte[] encoding)
throws java.io.IOException
java.io.IOExceptionpublic byte[] encodeParameter(java.math.BigInteger x)
throws java.io.IOException
java.io.IOExceptionpublic byte[] encodePublicKey(javax.crypto.interfaces.DHPublicKey publicKey)
throws java.io.IOException
java.io.IOExceptionpublic java.security.KeyPair generateKeyPair()
throws java.io.IOException
java.io.IOException