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

    Modifier and Type
    Method
    Description
    extractSecret(byte[] encapsulation, int offset, int length)
    Open up an encapsulation and extract the key material it contains.
    Return the parameters being used by this extractor.
  • Method Details

    • 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.