Here you can find the source of aesCrypt(byte[] content, Key key, int crypt)
private static byte[] aesCrypt(byte[] content, Key key, int crypt)
//package com.java2s; //License from project: Open Source License import javax.crypto.Cipher; import java.security.Key; public class Main { private static final String AES_CIPER_ALGRITHM = "AES/ECB/PKCS5Padding"; private static byte[] aesCrypt(byte[] content, Key key, int crypt) { try {/*from w w w . j av a 2 s. c om*/ Cipher cipher = Cipher.getInstance(AES_CIPER_ALGRITHM); cipher.init(crypt, key); return cipher.doFinal(content); } catch (Exception e) { e.printStackTrace(); } return content; } }