@Override
	public boolean initEncrypt(String password) {
		if (password == null || password.length() < 1) {
			Application.getController().displayError(
					Application.getResourceBundle().getString("password_not_null_title"),
					Application.getResourceBundle().getString("password_not_null_message"));
			return false;
		}
		try {
			cipher = Cipher.getInstance(getCipherInitString(), new BouncyCastleProvider());
			Key k = new SecretKeySpec(PasswordUtil.getKeyWithRightLength(password, getKeyLength()).getBytes(), algName);
			System.out.println(PasswordUtil.getKeyWithRightLength(password, getKeyLength()).getBytes());
			
				IvParameterSpec ivs = new IvParameterSpec(getIV());
				cipher.init(Cipher.ENCRYPT_MODE, k, ivs);
			
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
			return false;
		} catch (NoSuchPaddingException e) {
			e.printStackTrace();
			return false;
		} catch (InvalidKeyException e) {
			e.printStackTrace();
			return false;
		} catch (InvalidAlgorithmParameterException e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}