Here you can find the source of generateKeyAES()
private static Key generateKeyAES()
//package com.java2s; /**// ww w .j a v a2 s . com * Copyright (C) 2013 Company. All Rights Reserved. * * This software is the proprietary information of Company . * Use is subjected to license terms. * * @since Jul 14, 2013 8:27:33 PM * @author SPA * */ import java.security.Key; import javax.crypto.spec.SecretKeySpec; public class Main { private static final String AES_ALGO = "AES"; private static final byte[] KEY_VALUE_128_BIT = new byte[] { 'T', 'h', 'e', 'B', 'e', 's', 't', 'S', 'e', 'c', 'r', 'e', 't', 'K', 'e', 'y' }; private static Key generateKeyAES() { return new SecretKeySpec(KEY_VALUE_128_BIT, AES_ALGO); } }