Class JceTlsMLKemDomain
- java.lang.Object
-
- org.bouncycastle.tls.crypto.impl.jcajce.JceTlsMLKemDomain
-
- All Implemented Interfaces:
TlsKemDomain
public class JceTlsMLKemDomain extends java.lang.Object implements TlsKemDomain
-
-
Field Summary
Fields Modifier and Type Field Description protected JcaTlsCrypto
crypto
protected boolean
isServer
protected java.lang.String
kemName
-
Constructor Summary
Constructors Constructor Description JceTlsMLKemDomain(JcaTlsCrypto crypto, TlsKemConfig kemConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JceTlsSecret
adoptLocalSecret(byte[] secret)
TlsAgreement
createKem()
JceTlsSecret
decapsulate(java.security.PrivateKey privateKey, byte[] ciphertext)
java.security.PublicKey
decodePublicKey(byte[] encoding)
org.bouncycastle.jcajce.SecretKeyWithEncapsulation
encapsulate(java.security.PublicKey publicKey)
byte[]
encodePublicKey(java.security.PublicKey publicKey)
java.security.KeyPair
generateKeyPair()
boolean
isServer()
-
-
-
Field Detail
-
crypto
protected final JcaTlsCrypto crypto
-
kemName
protected final java.lang.String kemName
-
isServer
protected final boolean isServer
-
-
Constructor Detail
-
JceTlsMLKemDomain
public JceTlsMLKemDomain(JcaTlsCrypto crypto, TlsKemConfig kemConfig)
-
-
Method Detail
-
adoptLocalSecret
public JceTlsSecret adoptLocalSecret(byte[] secret)
-
createKem
public TlsAgreement createKem()
- Specified by:
createKem
in interfaceTlsKemDomain
-
decapsulate
public JceTlsSecret decapsulate(java.security.PrivateKey privateKey, byte[] ciphertext)
-
decodePublicKey
public java.security.PublicKey decodePublicKey(byte[] encoding) throws java.io.IOException
- Throws:
java.io.IOException
-
encapsulate
public org.bouncycastle.jcajce.SecretKeyWithEncapsulation encapsulate(java.security.PublicKey publicKey)
-
encodePublicKey
public byte[] encodePublicKey(java.security.PublicKey publicKey) throws java.io.IOException
- Throws:
java.io.IOException
-
generateKeyPair
public java.security.KeyPair generateKeyPair()
-
isServer
public boolean isServer()
-
-