private void invokeWithPossibleInvalidKey(String methodName, Object... args)
      throws InvalidKeyException {
    try {
      invoke(methodName, args);
    } catch (InvocationTargetException e) {
      Throwable cause = e.getCause();
      if (cause instanceof InvalidKeyException){
        throw (InvalidKeyException) cause;
      }
      throw new IllegalStateException(cause);
    }
  }
Duck typed implementation of {@link HpkeSpi}.
<p>
Will wrap any Object which implements all of the methods in HpkeSpi and delegate to them
by reflection.
common/src/main/java/org/conscrypt/DuckTypedHpkeSpi.java