Package org.apache.ftpserver.usermanager

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


            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

Related Classes of org.apache.ftpserver.usermanager.SaltedPasswordEncryptor

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.