public static byte[] generateMac(byte[] byteCipherText,SecretKey integrityKey) throws NoSuchAlgorithmException, InvalidKeyException {
  Mac sha256_HMAC=Mac.getInstance(HMAC_ALGORITHM);
  sha256_HMAC.init(integrityKey);
  return sha256_HMAC.doFinal(byteCipherText);
}

public static byte [ ] generateMac ( byte [ ] byteCipherText , SecretKey integrityKey ) throws NoSuchAlgorithmException , InvalidKeyException { Mac sha256_HMAC = Mac . getInstance ( HMAC_ALGORITHM ) ; sha256_HMAC . init ( integrityKey ) ; return sha256_HMAC . doFinal ( byteCipherText ) ; }
generate the mac based on hmac_algorithm
