static HpkeAead createAead(HpkeParameters.AeadId aeadId) throws GeneralSecurityException {
    if (aeadId.equals(HpkeParameters.AeadId.AES_128_GCM)) {
      return new AesGcmHpkeAead(16);
    }
    if (aeadId.equals(HpkeParameters.AeadId.AES_256_GCM)) {
      return new AesGcmHpkeAead(32);
    }
    if (aeadId.equals(HpkeParameters.AeadId.CHACHA20_POLY1305)) {
      return new ChaCha20Poly1305HpkeAead();
    }
    throw new GeneralSecurityException("Unrecognized HPKE AEAD identifier");
  }
Hybrid Public Key Encryption (HPKE) encryption.

<p>HPKE RFC: https://www.rfc-editor.org/rfc/rfc9180.html
java_src/src/main/java/com/google/crypto/tink/hybrid/internal/HpkeEncrypt.java