System.arraycopy(keydata, 0, key, 0, key.length);
SecretKeySpec keyspec = new SecretKeySpec(key, "HmacMD5");
mac.init(keyspec);
} catch (NoSuchAlgorithmException nsae) {
throw new AlgorithmInitializationException(
"No provider exists for the HmacSha1 algorithm");
} catch (InvalidKeyException ike) {
throw new AlgorithmInitializationException("Invalid key");
}
}