protected static HpkeSpi findSpi(String algorithm, Provider provider) throws
      NoSuchAlgorithmException, IllegalArgumentException {
    if (provider == null) {
      throw new IllegalArgumentException("null Provider");
    }
    Provider.Service service = provider.getService("ConscryptHpke", algorithm);
    if (service == null) {
      throw new NoSuchAlgorithmException("Unknown algorithm");
    }
    Object instance = service.newInstance(null);
    HpkeSpi spi = (instance instanceof HpkeSpi) ? (HpkeSpi) instance
            : DuckTypedHpkeSpi.newInstance(instance);
    if (spi != null) {
      return spi;
    }
    throw new IllegalStateException(
        String.format("Provider %s is providing incorrect instances", provider.getName()));
  }
Returns the {@link HpkeSpi} being used by this HpkeContext.

@return the SPI
common/src/main/java/org/conscrypt/HpkeContext.java