Class IESKEMCipher
- java.lang.Object
-
- javax.crypto.CipherSpi
-
- org.bouncycastle.jcajce.provider.asymmetric.util.BaseCipherSpi
-
- org.bouncycastle.jcajce.provider.asymmetric.ec.IESKEMCipher
-
- Direct Known Subclasses:
IESKEMCipher.KEM
public class IESKEMCipher extends BaseCipherSpi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IESKEMCipher.KEM
Classes that inherit from usstatic class
IESKEMCipher.KEMwithSHA256
-
Nested classes/interfaces inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseCipherSpi
BaseCipherSpi.ErasableOutputStream
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseCipherSpi
engineParams, wrapEngine
-
-
Constructor Summary
Constructors Constructor Description IESKEMCipher(ECDHCBasicAgreement agreement, KDF2BytesGenerator kdf, Mac hMac, int macKeyLength, int macLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
engineDoFinal(byte[] input, int inputOffset, int inputLen)
int
engineDoFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset)
int
engineGetBlockSize()
byte[]
engineGetIV()
int
engineGetKeySize(java.security.Key key)
int
engineGetOutputSize(int inputLen)
java.security.AlgorithmParameters
engineGetParameters()
void
engineInit(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random)
void
engineInit(int opmode, java.security.Key key, java.security.SecureRandom random)
void
engineInit(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec engineSpec, java.security.SecureRandom random)
void
engineSetMode(java.lang.String mode)
void
engineSetPadding(java.lang.String padding)
byte[]
engineUpdate(byte[] input, int inputOffset, int inputLen)
int
engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
-
Methods inherited from class org.bouncycastle.jcajce.provider.asymmetric.util.BaseCipherSpi
createParametersInstance, engineUnwrap, engineWrap
-
-
-
-
Constructor Detail
-
IESKEMCipher
public IESKEMCipher(ECDHCBasicAgreement agreement, KDF2BytesGenerator kdf, Mac hMac, int macKeyLength, int macLength)
-
-
Method Detail
-
engineGetBlockSize
public int engineGetBlockSize()
- Overrides:
engineGetBlockSize
in classBaseCipherSpi
-
engineGetKeySize
public int engineGetKeySize(java.security.Key key)
- Overrides:
engineGetKeySize
in classBaseCipherSpi
-
engineGetIV
public byte[] engineGetIV()
- Overrides:
engineGetIV
in classBaseCipherSpi
-
engineGetParameters
public java.security.AlgorithmParameters engineGetParameters()
- Overrides:
engineGetParameters
in classBaseCipherSpi
-
engineSetMode
public void engineSetMode(java.lang.String mode) throws java.security.NoSuchAlgorithmException
- Overrides:
engineSetMode
in classBaseCipherSpi
- Throws:
java.security.NoSuchAlgorithmException
-
engineGetOutputSize
public int engineGetOutputSize(int inputLen)
- Overrides:
engineGetOutputSize
in classBaseCipherSpi
-
engineSetPadding
public void engineSetPadding(java.lang.String padding) throws javax.crypto.NoSuchPaddingException
- Overrides:
engineSetPadding
in classBaseCipherSpi
- Throws:
javax.crypto.NoSuchPaddingException
-
engineInit
public void engineInit(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException
- Specified by:
engineInit
in classjavax.crypto.CipherSpi
- Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException
-
engineInit
public void engineInit(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec engineSpec, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException
- Specified by:
engineInit
in classjavax.crypto.CipherSpi
- Throws:
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
-
engineInit
public void engineInit(int opmode, java.security.Key key, java.security.SecureRandom random) throws java.security.InvalidKeyException
- Specified by:
engineInit
in classjavax.crypto.CipherSpi
- Throws:
java.security.InvalidKeyException
-
engineUpdate
public byte[] engineUpdate(byte[] input, int inputOffset, int inputLen)
- Specified by:
engineUpdate
in classjavax.crypto.CipherSpi
-
engineUpdate
public int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
- Specified by:
engineUpdate
in classjavax.crypto.CipherSpi
-
engineDoFinal
public byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
- Specified by:
engineDoFinal
in classjavax.crypto.CipherSpi
- Throws:
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
-
engineDoFinal
public int engineDoFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
- Specified by:
engineDoFinal
in classjavax.crypto.CipherSpi
- Throws:
javax.crypto.ShortBufferException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
-
-