EncapsulatedSecretExtractor (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.crypto

## Interface EncapsulatedSecretExtractor

- All Known Implementing Classes:
    CMCEKEMExtractor, CMCEKEMExtractor, ECIESKEMExtractor, FrodoKEMExtractor, FrodoKEMExtractor, HQCKEMExtractor, MLKEMExtractor, MLKEMExtractor, NTRUKEMExtractor, NTRULPRimeKEMExtractor, NTRUPlusKEMExtractor, RSAKEMExtractor, SABERKEMExtractor, SAKKEKEMExtractor, SNTRUPrimeKEMExtractor, XWingKEMExtractor

      public interface EncapsulatedSecretExtractor

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `extractSecret(byte[] encapsulation)` Extract the secret based on the recipient private key.
    `int` | `getEncapsulationLength()` Return the length in bytes of the encapsulation.

- - ### Method Detail

    - #### extractSecret

          byte[] extractSecret(byte[] encapsulation)

      Extract the secret based on the recipient private key.
      Parameters:
        `encapsulation` - the encapsulated secret.

    - #### getEncapsulationLength

          int getEncapsulationLength()

      Return the length in bytes of the encapsulation.
      Returns:
        length in bytes of an encapsulation for this parameter set.