Package org.bouncycastle.jcajce.spec
Class KEMKDFSpec
- java.lang.Object
-
- org.bouncycastle.jcajce.spec.KEMKDFSpec
-
- Direct Known Subclasses:
KEMExtractSpec,KEMGenerateSpec,KTSParameterSpec
public class KEMKDFSpec extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedKEMKDFSpec(AlgorithmIdentifier kdfAlgorithm, byte[] otherInfo, java.lang.String keyAlgorithmName, int keySizeInBits)Base constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmIdentifiergetKdfAlgorithm()java.lang.StringgetKeyAlgorithmName()intgetKeySize()byte[]getOtherInfo()
-
-
-
Constructor Detail
-
KEMKDFSpec
protected KEMKDFSpec(AlgorithmIdentifier kdfAlgorithm, byte[] otherInfo, java.lang.String keyAlgorithmName, int keySizeInBits)
Base constructor.A null otherInfo is stored as empty, so
getOtherInfo()never returns null. The Builder of every spec in this package already does that, but this constructor is reachable directly by a subclass - the deprecatedKEMParameterSpecis one - and org.bouncycastle.jcajce.provider.asymmetric.util.KdfUtil's KMAC and SHAKE-256 branches read the otherInfo length without a guard, so a null here would surface as a NullPointerException out of a KEM operation.- Parameters:
kdfAlgorithm- the KDF to derive with, or null for the shared secret as it comes.otherInfo- the otherInfo/IV to feed the KDF, may be null for none.keyAlgorithmName- the algorithm name for the derived key.keySizeInBits- the size of the key to derive.
-
-
Method Detail
-
getKeyAlgorithmName
public java.lang.String getKeyAlgorithmName()
-
getKeySize
public int getKeySize()
-
getKdfAlgorithm
public AlgorithmIdentifier getKdfAlgorithm()
-
getOtherInfo
public byte[] getOtherInfo()
-
-