@AccessesPartialKey
  public static HybridEncrypt create(EciesPublicKey key) throws GeneralSecurityException {
    EllipticCurves.CurveType curveType =
        CURVE_TYPE_CONVERTER.toProtoEnum(key.getParameters().getCurveType());
    ECPublicKey recipientPublicKey =
        EllipticCurves.getEcPublicKey(
            curveType,
            key.getNistCurvePoint().getAffineX().toByteArray(),
            key.getNistCurvePoint().getAffineY().toByteArray());
    byte[] hkdfSalt = new byte[0];
    if (key.getParameters().getSalt() != null) {
      hkdfSalt = key.getParameters().getSalt().toByteArray();
    }
    return new EciesAeadHkdfHybridEncrypt(
        recipientPublicKey,
        hkdfSalt,
        toHmacAlgo(key.getParameters().getHashType()),
        POINT_FORMAT_TYPE_CONVERTER.toProtoEnum(key.getParameters().getNistCurvePointFormat()),
        createHelper(key.getParameters().getDemParameters()),
        key.getOutputPrefix().toByteArray());
  }
ECIES encryption with HKDF-KEM (key encapsulation mechanism) and AEAD-DEM (data
encapsulation mechanism).

@since 1.0.0
java_src/src/main/java/com/google/crypto/tink/subtle/EciesAeadHkdfHybridEncrypt.java