Code example for BadPaddingException

Methods: printStackTrace

0
			Log.e("IllegalBlockSizeException",
					"IllegalBlockSizeException private decrypt"); 
			e.printStackTrace();
		} catch (BadPaddingException e) {
			Log.e("BadPaddingException", "BadPaddingException private decrypt");
			e.printStackTrace();
		} 
		return encrypted;
	} 
 
	/** 
	 * @param raw a byte[] used for symmetric key generation. 
	 * @param cipherText a byte[] of the cipher text (encrypted) 
	 * @return a byte[] of the plain text 
	 */ 
	private static byte[] decrypt(byte[] raw, byte[] cipherText) {
		SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
		Cipher cipher;
		byte[] decrypted = null;
		try { 
			cipher = Cipher.getInstance("AES");