code: @Override
      public Builder signWith(String algorithm, Key key) throws KeyException {
  
          if (algorithm == null || algorithm.isEmpty() || !algorithm.equals(Constants.SIGNATURE_ALG_RS256)) {
              String err = Tr.formatMessage(tc, "JWT_INVALID_ALGORITHM_ERR", new Object[] { algorithm, Constants.SIGNATURE_ALG_RS256 });
              throw new KeyException(err);
          }
          if (key == null || !(key instanceof RSAPrivateKey)) {
              String err = Tr.formatMessage(tc, "JWT_INVALID_KEY_ERR", new Object[] { algorithm, key });
              throw new KeyException(err);
          }
          alg = algorithm;
          privateKey = key;
          return this;
      }
docs: /*
  (non-Javadoc)
  
  @see com.ibm.ws.security.jwt.internal.Builder#signWith(java.lang.String, java.security.Key)