public byte[] decrypt(byte[] textEncrypted, String key){
		byte[] decrypted = null; 
		try{
			//keygenerator.init(bits); // 192 and bits bits may not be available
			byte[] keyPadded = new byte[bits / 8];
			
			for(int i = 0; i < bits / 8 && i < key.length(); i++){
				keyPadded[i] = (byte)key.charAt(i);
			}
	
			/* Generate the secret key specs. */
			SecretKeySpec mykey = new SecretKeySpec(keyPadded, "AES");
			
			   // Create the cipher 
		    desCipher = Cipher.getInstance("AES");
	
			
			// Initialize the cipher for encryption
		    desCipher.init(Cipher.DECRYPT_MODE, mykey);
		    
		    // Encrypt the text
		    decrypted = desCipher.doFinal(textEncrypted);
		}catch(IllegalBlockSizeException e){
			e.printStackTrace();
		}catch(BadPaddingException e){
			e.printStackTrace();
		} catch (InvalidKeyException e) {
			e.printStackTrace();
			System.out.println("error in desCipher.init");
		//} 
		} catch (NoSuchAlgorithmException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchPaddingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return decrypted;
	}