Here you can find the source of decrypt(byte[] raw, byte[] encrypted)
private static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception
//package com.java2s; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; public class Main { private static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception { SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES"); Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.DECRYPT_MODE, skeySpec); byte[] decrypted = cipher.doFinal(encrypted); return decrypted; }/*from w w w .j av a2s. c o m*/ }