Package org.jets3t.service.security

Examples of org.jets3t.service.security.ProviderCredentials.save()


        final ByteArrayInputStream[] bais = new ByteArrayInputStream[1];
        try {
            // Convert credentials into a readable input stream.
            String algorithm = myProperties.getStringProperty("crypto.algorithm", "PBEWithMD5AndDES");
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            credentials.save(password, baos, algorithm);
            bais[0] = new ByteArrayInputStream(baos.toByteArray());
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            String message = "Unable to encrypt your credentials";
View Full Code Here


        File credentialsFile = new File(directory, myCredentials.getFriendlyName() + ".enc");

        try {
            String algorithm = myProperties.getStringProperty("crypto.algorithm", "PBEWithMD5AndDES");
            myCredentials.save(password, credentialsFile, algorithm);
            loginLocalFolderPanel.clearPassword();
            loginLocalFolderPanel.refreshStoredCredentialsTable();

            JOptionPane.showMessageDialog(ownerFrame, "Your credentials have been stored in the file:\n" +
                credentialsFile.getAbsolutePath());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.