org.bouncycastle.pqc.crypto.ntru

## Class NTRUKEMGenerator

- java.lang.Object
- - org.bouncycastle.pqc.crypto.ntru.NTRUKEMGenerator

- All Implemented Interfaces:
    EncapsulatedSecretGenerator

      public class NTRUKEMGenerator
      extends java.lang.Object
      implements EncapsulatedSecretGenerator

  Encapsulate a secret using NTRU. returns a `SecretWithEncapsulation` as encapsulation.
  See Also:
    `NTRUKEMExtractor`, NTRU website

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NTRUKEMGenerator(java.security.SecureRandom random)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SecretWithEncapsulation` | `generateEncapsulated(AsymmetricKeyParameter recipientKey)` Generate secret/encapsulation based on the recipient public key.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NTRUKEMGenerator

          public NTRUKEMGenerator(java.security.SecureRandom random)

  - ### Method Detail

    - #### generateEncapsulated

          public SecretWithEncapsulation generateEncapsulated(AsymmetricKeyParameter recipientKey)

      Description copied from interface: `EncapsulatedSecretGenerator`
      Generate secret/encapsulation based on the recipient public key.
      Specified by:
        `generateEncapsulated` in interface `EncapsulatedSecretGenerator`
      Returns:
        An SecretWithEncapsulation derived from the recipient public key.