public void decryptFile() {
        try {
            if (_cryptPath.isEmpty()) {
                Logger.addMessage("Select file to decrypt.");
                return;
            }
            Path fileOrg = Paths.get(_path);
            Path fileCopy = Paths.get(_path + ".tmp");
            Files.copy(fileOrg, fileCopy, StandardCopyOption.REPLACE_EXISTING);
            _path = _path + ".tmp";

            CryptoProperies properies = _XMLHeaderHandler.takeXMLHeaderFromFile(_path);
            if (properies.error != null) {
                Logger.addMessage("Error in header of choosen file!");
                return;
            }

            this.setCryptoProperies(properies);
            _keyProvider.makeKeyFromXML(properies.key, Integer.parseInt(properies.keySize));
            _key = _keyProvider.getKey();

            if (_iv != null) {
                _iv = HexOperations.toByteArray(_properies.iv);
                _cipher.init(Cipher.DECRYPT_MODE, _key, new IvParameterSpec(_iv));
            } else {
                _cipher.init(Cipher.DECRYPT_MODE, _key);
            }

            this.decrypt(new FileInputStream(_path), new FileOutputStream(_decryptPath));
            Logger.addMessage("File decrypted to: " + _decryptPath);
            this._key = null;
        } catch (Exception ex) {
            Logger.addMessage("Exception in decryptFile(): " + ex);
        } finally {
            new File(_path).delete();
            burnKey();
        }

    }