Package ua.pp.bizon.cripto.configuration

Examples of ua.pp.bizon.cripto.configuration.Configuration


        LOG.info("*****test file started******");
        IPath from = FileFactory.getLocalFile(prefix + "1.pdf");
        FtpConfig readConfig = FtpConfig.readConfig(HOST);
        IPath to = FileFactory.getRemoteFile(readConfig.getUrl(), readConfig.getLogin(), readConfig.getPass(), "backup/1/1.pdf");
        CryptoUtil cryptoUtil = new CryptoUtil(credentials);
        Configuration c = new Configuration();
        c.setDirection(Direction.ENCODE);
        c.setFrom(from);
        c.setTo(to);
        cryptoUtil.process(c);
        LOG.info("*****write to server done******");
        IPath response = FileFactory.getLocalFile(prefix + "2.pdf");
        c.setDirection(Direction.DECODE);
        c.setFrom(to);
        c.setTo(response);
        cryptoUtil.process(c);
        LOG.info("*****load from server done******");
        assertTrue(FileUtils.contentEquals(new File(from.getPath()), new File(response.getPath())));
        LOG.info("*****assert files done******");
        new File(prefix + "2.pdf").delete();
View Full Code Here


        LOG.info("*****test directory started******");
        IPath from = FileFactory.getLocalFile(prefix + "directory");
        FtpConfig readConfig = FtpConfig.readConfig(HOST);
        IPath to = FileFactory.getRemoteFile(readConfig.getUrl(), readConfig.getLogin(), readConfig.getPass(), "backup/2/");
        CryptoUtil cryptoUtil = new CryptoUtil(credentials);
        Configuration c = new Configuration();
        c.setDirection(Direction.ENCODE);
        c.setFrom(from);
        c.setTo(to);
        cryptoUtil.process(c);
        LOG.info("*****write to server done******");
        IPath response = FileFactory.getLocalFile(prefix + "responce");
        c.setDirection(Direction.DECODE);
        c.setFrom(to);
        c.setTo(response);
        cryptoUtil.process(c);
        LOG.info("*****load from server done******");
        assertDirectories(new File(from.getPath()), new File(response.getPath()));
        LOG.info("*****assert directories done******");
        FileUtils.deleteDirectory(new File(response.getPath()));
View Full Code Here

        SelectSourceDialog frame = new SelectSourceDialog(null, true);
            if (c != null) {
                frame.getSelectFromPathPanel().select(c.getFrom());
                frame.getSelectToPathPanel().select(c.getTo());
            }
            c = new Configuration();
            frame.setVisible(true);
            c.setFrom(frame.getSelectFromPathPanel().getSelected());
            c.setTo(frame.getSelectToPathPanel().getSelected());
            c.setDirection(frame.getDirection());
            return c;
View Full Code Here

        process();
            }// GEN-LAST:event_decodeButtonActionPerformed

    protected void process() {
        try {
            new CryptoUtil(credentials).process(new Configuration(selectFromPathPanel.getSelected(), selectToPathPanel.getSelected(), direction));
        } catch (CryptoException e) {
            JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
        }
    }
View Full Code Here

TOP

Related Classes of ua.pp.bizon.cripto.configuration.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.