Code example for BadPaddingException

Methods: printStackTrace

0
		} catch (IllegalBlockSizeException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (BadPaddingException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} 
		 
		return null; 
	} 
 
	public void onMainViewDraw(Canvas canvas) throws InvalidKeySpecException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException {
		File crypt = new File(Environment.getExternalStorageDirectory() + "/AES/Crypt");
		String[] files = crypt.list();
		Arrays.sort(files);
		 
		FileInputStream fis;
		try { 
			fis = new FileInputStream(Environment.getExternalStorageDirectory() + "/AES/Crypt/i500p.jpg");
			CipherInputStream cis = mAES.getDecrypter().streamDecrypt(fis, cipher);
			Bitmap bm = BitmapFactory.decodeStream(cis);