Class BaseAgreementSpi
java.lang.Object
javax.crypto.KeyAgreementSpi
org.bouncycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi
- Direct Known Subclasses:
KeyAgreementSpi
,KeyAgreementSpi
,KeyAgreementSpi
,KeyAgreementSpi
,KeyAgreementSpi
,KeyAgreementSpi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String
protected final DerivationFunction
protected byte[]
protected byte[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract byte[]
protected abstract void
doInitFromKey
(Key key, AlgorithmParameterSpec parameterSpec, SecureRandom random) protected byte[]
protected int
engineGenerateSecret
(byte[] sharedSecret, int offset) protected SecretKey
engineGenerateSecret
(String algorithm) protected void
engineInit
(Key key, SecureRandom random) protected void
engineInit
(Key key, AlgorithmParameterSpec params, SecureRandom random) protected static String
getAlgorithm
(String algDetails) protected static int
getKeySize
(String algDetails) protected static byte[]
trimZeroes
(byte[] secret) Methods inherited from class javax.crypto.KeyAgreementSpi
engineDoPhase
-
Field Details
-
kaAlgorithm
-
kdf
-
ukmParameters
protected byte[] ukmParameters -
ukmParametersSalt
protected byte[] ukmParametersSalt
-
-
Constructor Details
-
BaseAgreementSpi
-
-
Method Details
-
getAlgorithm
-
getKeySize
-
trimZeroes
protected static byte[] trimZeroes(byte[] secret) -
engineInit
- Specified by:
engineInit
in classKeyAgreementSpi
- Throws:
InvalidKeyException
-
engineInit
protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Specified by:
engineInit
in classKeyAgreementSpi
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
-
engineGenerateSecret
- Specified by:
engineGenerateSecret
in classKeyAgreementSpi
- Throws:
IllegalStateException
-
engineGenerateSecret
protected int engineGenerateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException - Specified by:
engineGenerateSecret
in classKeyAgreementSpi
- Throws:
IllegalStateException
ShortBufferException
-
engineGenerateSecret
- Specified by:
engineGenerateSecret
in classKeyAgreementSpi
- Throws:
NoSuchAlgorithmException
-
doCalcSecret
protected abstract byte[] doCalcSecret() -
doInitFromKey
protected abstract void doInitFromKey(Key key, AlgorithmParameterSpec parameterSpec, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
-