Code example for Cipher

Methods: doFinalinit

0
		cipher.init(Cipher.ENCRYPT_MODE, key);
		return cipher.doFinal(data);
	} 
	 
	public synchronized byte[] decrypt(byte[] data) throws InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
		cipher.init(Cipher.DECRYPT_MODE, key);
		return cipher.doFinal(data);
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE