code: private byte[] decryptV2Data(AES256v2Ciphertext aesCiphertext,
        SecretKey decryptionKey, SecretKey hmacKey) throws CryptorException {
  
      try {
        Mac mac = Mac.getInstance(HMAC_ALGORITHM);
        mac.init(hmacKey);
        byte[] hmacValue = mac.doFinal(aesCiphertext.getDataToHMAC());
  
        if (!arraysEqual(hmacValue, aesCiphertext.getHmac())) {
          throw new InvalidHMACException("Incorrect HMAC value.");
        }
  
        Cipher cipher = Cipher.getInstance(AES_CIPHER_ALGORITHM);
        cipher.init(Cipher.DECRYPT_MODE, decryptionKey, new IvParameterSpec(
            aesCiphertext.getIv()));
  
        return cipher.doFinal(aesCiphertext.getCiphertext());
      } catch (InvalidKeyException e) {
        throw new CryptorException(
            "Caught InvalidKeyException. Do you have unlimited strength jurisdiction files installed?",
            e);
      } catch (GeneralSecurityException e) {
        throw new CryptorException("Failed to decrypt message.", e);
      }
    }
docs: Decrypts data.
  
  @param aesCiphertext
  the ciphertext from the message
  @param decryptionKey
  the key to decrypt
  @param hmacKey
  the key to recalculate the HMAC
  @return the decrypted data
  @throws CryptorException
  if a JCE error occurs