public void changeSignature(String person, String path, String newSign) {
        try {
            ArrayList<User> users = DataBase.getInstance().getUsers();
            for (Iterator it = users.iterator(); it.hasNext();) {
                User user = (User) it.next();
                if (user.getLogin().equals(person)) {
                    ArrayList<SignatureFile> files = user.getFiles();
                    for (Iterator iti = files.iterator(); iti.hasNext();) {
                        SignatureFile file = (SignatureFile) iti.next();
                        if (file.getFile().getAbsolutePath().equals(path)) {
                            SignatureGenerator generator = new SignatureGenerator();
                            generator.setSignatureListener(new GeneratorListener(file));
                            file.setAlgorithm(newSign);
                            generator.execute(file, user.getKeys().getPrivateKey());

                            DataBase.getInstance().save();

                        }
                    }
                }
            }
        } catch (Exception e) {
            System.out.println(e.getMessage());
            Logger.getLogger(ChangeSignature.class.getName()).log(Level.SEVERE, null, e);
        }
    }