Package org.bouncycastle.crypto
Interface EncapsulatedSecretExtractor<T extends Parameters>
-
- Type Parameters:
T
- the type for the parameters used by this extractor.
- All Known Implementing Classes:
FipsEncapsulatedSecretExtractor
public interface EncapsulatedSecretExtractor<T extends Parameters>
Interface describing an encapsulated secret extractor. These represent algorithms such as KTS.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SecretWithEncapsulation
extractSecret(byte[] encapsulation, int offset, int length)
Open up an encapsulation and extract the key material it contains.T
getParameters()
Return the parameters being used by this extractor.
-
-
-
Method Detail
-
getParameters
T getParameters()
Return the parameters being used by this extractor.- Returns:
- the extractor parameters.
-
extractSecret
SecretWithEncapsulation extractSecret(byte[] encapsulation, int offset, int length) throws InvalidCipherTextException
Open up an encapsulation and extract the key material it contains.- Parameters:
encapsulation
- the data that is carrying the secret.offset
- the offset into encapsulation that the actual encapsulation starts at.length
- the length of the encapsulation stored in the encapsulation array.- Returns:
- the secret and the data representing the encapsulation.
- Throws:
InvalidCipherTextException
- if there is an issue opening the encapsulation.
-
-