public class KeyAgreementSpi extends BaseAgreementSpi
Modifier and Type | Class and Description |
---|---|
static class |
KeyAgreementSpi.DHwithRFC2631KDF |
ukmParameters
Constructor and Description |
---|
KeyAgreementSpi() |
KeyAgreementSpi(String kaAlgorithm,
DerivationFunction kdf) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
bigIntToBytes(BigInteger r) |
protected byte[] |
calcSecret() |
protected Key |
engineDoPhase(Key key,
boolean lastPhase) |
protected byte[] |
engineGenerateSecret() |
protected int |
engineGenerateSecret(byte[] sharedSecret,
int offset) |
protected SecretKey |
engineGenerateSecret(String algorithm) |
protected void |
engineInit(Key key,
AlgorithmParameterSpec params,
SecureRandom random) |
protected void |
engineInit(Key key,
SecureRandom random) |
getAlgorithm, getKeySize, trimZeroes
public KeyAgreementSpi()
public KeyAgreementSpi(String kaAlgorithm, DerivationFunction kdf)
protected byte[] bigIntToBytes(BigInteger r)
protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException
engineDoPhase
in class KeyAgreementSpi
InvalidKeyException
IllegalStateException
protected byte[] engineGenerateSecret() throws IllegalStateException
engineGenerateSecret
in class BaseAgreementSpi
IllegalStateException
protected int engineGenerateSecret(byte[] sharedSecret, int offset) throws IllegalStateException, ShortBufferException
engineGenerateSecret
in class BaseAgreementSpi
IllegalStateException
ShortBufferException
protected SecretKey engineGenerateSecret(String algorithm) throws NoSuchAlgorithmException
engineGenerateSecret
in class BaseAgreementSpi
NoSuchAlgorithmException
protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
engineInit
in class KeyAgreementSpi
InvalidKeyException
InvalidAlgorithmParameterException
protected void engineInit(Key key, SecureRandom random) throws InvalidKeyException
engineInit
in class KeyAgreementSpi
InvalidKeyException
protected byte[] calcSecret()
calcSecret
in class BaseAgreementSpi
Copyright © 2018 BouncyCastle.org. All rights reserved.