// common for both user managers
if (StringUtils.hasText(element.getAttribute("encrypt-passwords"))) {
String encryptionStrategy = element.getAttribute("encrypt-passwords");
if(encryptionStrategy.equals("true") || encryptionStrategy.equals("md5")) {
factoryBuilder.addPropertyValue("passwordEncryptor", new Md5PasswordEncryptor());
} else if(encryptionStrategy.equals("salted")) {
factoryBuilder.addPropertyValue("passwordEncryptor", new SaltedPasswordEncryptor());
} else {
factoryBuilder.addPropertyValue("passwordEncryptor", new ClearTextPasswordEncryptor());
}