Class KeyAgreementSpi
- java.lang.Object
-
- javax.crypto.KeyAgreementSpi
-
- org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
-
- org.bouncycastle.pqc.jcajce.provider.newhope.KeyAgreementSpi
-
public class KeyAgreementSpi extends BaseAgreementSpi
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
kaAlgorithm, kdf, ukmParameters
-
-
Constructor Summary
Constructors Constructor Description KeyAgreementSpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
calcSecret()
protected Key
engineDoPhase(Key key, boolean lastPhase)
protected byte[]
engineGenerateSecret()
protected int
engineGenerateSecret(byte[] bytes, int offset)
protected void
engineInit(Key key, SecureRandom secureRandom)
protected void
engineInit(Key key, AlgorithmParameterSpec algorithmParameterSpec, SecureRandom secureRandom)
-
Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
engineGenerateSecret, getAlgorithm, getKeySize, trimZeroes
-
-
-
-
Method Detail
-
engineInit
protected void engineInit(Key key, SecureRandom secureRandom) throws InvalidKeyException
- Specified by:
engineInit
in classKeyAgreementSpi
- Throws:
InvalidKeyException
-
engineInit
protected void engineInit(Key key, AlgorithmParameterSpec algorithmParameterSpec, SecureRandom secureRandom) throws InvalidKeyException, InvalidAlgorithmParameterException
- Specified by:
engineInit
in classKeyAgreementSpi
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
-
engineDoPhase
protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException
- Specified by:
engineDoPhase
in classKeyAgreementSpi
- Throws:
InvalidKeyException
IllegalStateException
-
engineGenerateSecret
protected byte[] engineGenerateSecret() throws IllegalStateException
- Overrides:
engineGenerateSecret
in classBaseAgreementSpi
- Throws:
IllegalStateException
-
engineGenerateSecret
protected int engineGenerateSecret(byte[] bytes, int offset) throws IllegalStateException, ShortBufferException
- Overrides:
engineGenerateSecret
in classBaseAgreementSpi
- Throws:
IllegalStateException
ShortBufferException
-
calcSecret
protected byte[] calcSecret()
- Specified by:
calcSecret
in classBaseAgreementSpi
-
-