Examples of SaltedPasswordEncryptor


Examples of org.apache.ftpserver.usermanager.SaltedPasswordEncryptor

public class ManagingUsers {

    public static void main(String[] args) throws Exception {
        PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
        userManagerFactory.setFile(new File("myusers.properties"));
        userManagerFactory.setPasswordEncryptor(new SaltedPasswordEncryptor());
        UserManager um = userManagerFactory.createUserManager();
       
        BaseUser user = new BaseUser();
        user.setName("myNewUser");
        user.setPassword("secret");
View Full Code Here

Examples of org.apache.ftpserver.usermanager.SaltedPasswordEncryptor

            String encryptionStrategy = element.getAttribute("encrypt-passwords");
           
            if(encryptionStrategy.equals("true") || encryptionStrategy.equals("md5")) {
                builder.addPropertyValue("passwordEncryptor", new Md5PasswordEncryptor());
            } else if(encryptionStrategy.equals("salted")) {
                builder.addPropertyValue("passwordEncryptor", new SaltedPasswordEncryptor());
            } else {
                builder.addPropertyValue("passwordEncryptor", new ClearTextPasswordEncryptor());
            }
        }
       
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.