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 Stringprotected final DerivationFunctionprotected byte[]protected byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract byte[]protected abstract voiddoInitFromKey(Key key, AlgorithmParameterSpec parameterSpec, SecureRandom random) protected byte[]protected intengineGenerateSecret(byte[] sharedSecret, int offset) protected SecretKeyengineGenerateSecret(String algorithm) protected voidengineInit(Key key, SecureRandom random) protected voidengineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) protected static StringgetAlgorithm(String algDetails) protected static intgetKeySize(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:
engineInitin classKeyAgreementSpi- Throws:
InvalidKeyException
-
engineInit
protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Specified by:
engineInitin classKeyAgreementSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineGenerateSecret
- Specified by:
engineGenerateSecretin classKeyAgreementSpi- Throws:
IllegalStateException
-
engineGenerateSecret
protected int engineGenerateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException - Specified by:
engineGenerateSecretin classKeyAgreementSpi- Throws:
IllegalStateExceptionShortBufferException
-
engineGenerateSecret
- Specified by:
engineGenerateSecretin classKeyAgreementSpi- Throws:
NoSuchAlgorithmException
-
doCalcSecret
protected abstract byte[] doCalcSecret() -
doInitFromKey
protected abstract void doInitFromKey(Key key, AlgorithmParameterSpec parameterSpec, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
-