public static EcdsaPublicKey createEcdsaPubKey(
      HashType hashType,
      EllipticCurveType curve,
      EcdsaSignatureEncoding encoding,
      byte[] pubX,
      byte[] pubY)
      throws Exception {
    final int version = 0;
    EcdsaParams ecdsaParams =
        EcdsaParams.newBuilder()
            .setHashType(hashType)
            .setCurve(curve)
            .setEncoding(encoding)
            .build();
    return EcdsaPublicKey.newBuilder()
        .setVersion(version)
        .setParams(ecdsaParams)
        .setX(ByteString.copyFrom(pubX))
        .setY(ByteString.copyFrom(pubY))
        .build();
  }
@return a {@code EcdsaPublicKey} constructed from {@code HashType}, {@code EllipticCurveType}
    and affine coordinates of the public key.
java_src/src/main/java/com/google/crypto/tink/testing/TestUtil.java