org.bouncycastle.crypto.kems

## Class MLKEMGenerator

- java.lang.Object
- - org.bouncycastle.crypto.kems.MLKEMGenerator

- All Implemented Interfaces:
    EncapsulatedSecretGenerator

      public class MLKEMGenerator
      extends java.lang.Object
      implements EncapsulatedSecretGenerator

- - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `SecretWithEncapsulation` | `generateEncapsulated(AsymmetricKeyParameter recipientKey)` Generate secret/encapsulation based on the recipient public key.
    `SecretWithEncapsulation` | `internalGenerateEncapsulated(AsymmetricKeyParameter recipientKey, byte[] randBytes)` Deprecated. Use `internalGenerateEncapsulated(MLKEMPublicKeyParameters, byte[])` instead.
    `static SecretWithEncapsulation` | `internalGenerateEncapsulated(MLKEMPublicKeyParameters recipientKey, byte[] randBytes)`

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

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

- - ### Constructor Detail

    - #### MLKEMGenerator

          public MLKEMGenerator(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.

    - #### internalGenerateEncapsulated

          public SecretWithEncapsulation internalGenerateEncapsulated(AsymmetricKeyParameter recipientKey,
                                                                      byte[] randBytes)

      Deprecated. Use `internalGenerateEncapsulated(MLKEMPublicKeyParameters, byte[])` instead.

    - #### internalGenerateEncapsulated

          public static SecretWithEncapsulation internalGenerateEncapsulated(MLKEMPublicKeyParameters recipientKey,
                                                                             byte[] randBytes)