code: public final void init(Key key, AlgorithmParameterSpec params)
              throws InvalidKeyException, InvalidAlgorithmParameterException {
          if (spi != null && (key == null || lock == null)) {
              spi.engineInit(key, params);
          } else {
              chooseProvider(key, params);
          }
          initialized = true;
  
          /* Android-removed: this debugging mechanism is not used in Android.
          if (!skipDebug && pdebug != null) {
              pdebug.println("Mac." + algorithm + " algorithm from: " +
                  this.provider.getName());
          }
          */
      }
docs: Initializes this <code>Mac</code> object with the given key and
  algorithm parameters.
  
  @param key the key.
  @param params the algorithm parameters.
  
  @exception InvalidKeyException if the given key is inappropriate for
  initializing this MAC.
  @exception InvalidAlgorithmParameterException if the given algorithm
  parameters are inappropriate for this MAC.