/** * Initializes the HMAC with the given secret key and algorithm parameters. * * @param key the secret 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. */ protected void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException { hmac.init(key, params); }