@RestrictedApi(
      explanation = "Accessing parts of keys can produce unexpected incompatibilities, annotate the function with @AccessesPartialKey",
      link = "https://developers.google.com/tink/design/access_control#accessing_partial_keys",
      allowedOnPath = ".*Test\\.java",
      allowlistAnnotations = {AccessesPartialKey.class})
  public static HpkePublicKey create(
      HpkeParameters parameters, Bytes publicKeyBytes, @Nullable Integer idRequirement)
      throws GeneralSecurityException {
    validateIdRequirement(parameters.getVariant(), idRequirement);
    validatePublicKey(parameters.getKemId(), publicKeyBytes);
    Bytes prefix = createOutputPrefix(parameters.getVariant(), idRequirement);
    return new HpkePublicKey(parameters, publicKeyBytes, prefix, idRequirement);
  }
Creates a new HPKE public key.

@param parameters HPKE parameters for the public key
@param publicKeyBytes Public key encoded according to
    https://www.rfc-editor.org/rfc/rfc9180.html#section-7.1.1
@param idRequirement Key id requirement, which must be null for {@code NO_PREFIX} variant and
    non-null for all other variants
java_src/src/main/java/com/google/crypto/tink/hybrid/HpkePublicKey.java