### Question:
AES { public static byte[] decryptByCBC(byte[] ciphertext, byte[] key, byte[] iv) { return doAES(ciphertext, key, iv, Cipher.DECRYPT_MODE, AESType.CBC, "PKCS5Padding"); }  static byte[] encryptByCTR(byte[] data, byte[] key, byte[] iv); static byte[] decryptByCTR(byte[] ciphertext, byte[] key, byte[] iv); static byte[] encryptByCBC(byte[] data, byte[] key, byte[] iv); static byte[] decryptByCBC(byte[] ciphertext, byte[] key, byte[] iv); static byte[] encryptByCTRNoPadding(byte[] data, byte[] key, byte[] iv); static byte[] decryptByCTRNoPadding(byte[] ciphertext, byte[] key, byte[] iv); static byte[] encryptByCBCNoPadding(byte[] data, byte[] key, byte[] iv); static byte[] decryptByCBCNoPadding(byte[] ciphertext, byte[] key, byte[] iv);  }### Answer:
@Test public void doCBCDecrypt() { for (String[] example : CBCExample) { byte[] decrypt = AES.decryptByCBC(NumericUtil.hexToBytes(example[0]), NumericUtil.hexToBytes(example[2]), NumericUtil.hexToBytes(example[3])); assertEquals(example[1], NumericUtil.bytesToHex(decrypt)); } }