Package org.jasypt.encryption.pbe

Examples of org.jasypt.encryption.pbe.StandardPBEStringEncryptor


        if (this.encryptorSet) {
            throw new EncryptionInitializationException(
                    "An encryptor has been already set: no " +
                    "further configuration possible on hibernate wrapper");
        }
        StandardPBEStringEncryptor standardPBEStringEncryptor =
            (StandardPBEStringEncryptor) this.encryptor;
        standardPBEStringEncryptor.setStringOutputType(stringOutputType);
    }
View Full Code Here


        if (this.encryptorSet) {
            throw new EncryptionInitializationException(
                    "An encryptor has been already set: no " +
                    "further configuration possible on hibernate wrapper");
        }
        StandardPBEStringEncryptor standardPBEStringEncryptor =
            (StandardPBEStringEncryptor) this.encryptor;
        standardPBEStringEncryptor.setConfig(config);
    }
View Full Code Here

    /**
     * Creates a new instance of <tt>BasicTextEncryptor</tt>.
     */
    public BasicTextEncryptor() {
        super();
        this.encryptor = new StandardPBEStringEncryptor();
        this.encryptor.setAlgorithm("PBEWithMD5AndDES");
    }
View Full Code Here

    /**
     * Creates a new instance of <tt>StrongTextEncryptor</tt>.
     */
    public StrongTextEncryptor() {
        super();
        this.encryptor = new StandardPBEStringEncryptor();
        this.encryptor.setAlgorithm("PBEWithMD5AndTripleDES");
    }
View Full Code Here

* Holds utility methods used work with encrypted values.
*/
public class EncryptionSupport {

    static public void decrypt(Properties props) {
        StandardPBEStringEncryptor encryptor = createEncryptor();
        for (Object k : new ArrayList(props.keySet())) {
            String key = (String) k;
            String value = props.getProperty(key);
            if (PropertyValueEncryptionUtils.isEncryptedValue(value)) {
                value = PropertyValueEncryptionUtils.decrypt(value, encryptor);
View Full Code Here

            }
        }

    }
    public static StandardPBEStringEncryptor createEncryptor() {
        StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
        EnvironmentStringPBEConfig config = new EnvironmentStringPBEConfig();
        config.setAlgorithm("PBEWithMD5AndDES");
        config.setPasswordEnvName("ACTIVEMQ_ENCRYPTION_PASSWORD");
        encryptor.setConfig(config);
        return encryptor;
    }
View Full Code Here

        if (stringOutputType != null) {
            config.setStringOutputType(stringOutputType);
        }
       
       
        final StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
        encryptor.setConfig(config);
       
        return encryptor.encrypt(input);
       
    }
View Full Code Here

        if (stringOutputType != null) {
            config.setStringOutputType(stringOutputType);
        }
       
       
        final StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
        encryptor.setConfig(config);
       
        return encryptor.decrypt(input);
       
    }
View Full Code Here

     * Creates a new instance
     *
     * @param passwordProperty the name of the system property to read from
     */
    public EncryptedPropertiesStore(String passwordProperty) {
        encryptor = new StandardPBEStringEncryptor();
        encryptor.setPassword(getFromSystemPropertyOrSystemEnv(passwordProperty));
    }
View Full Code Here

            String rawZookeeperPassword = getStringData(getCurator(), ZkPath.AUTHENTICATION_CRYPT_PASSWORD.getPath());
            if (rawZookeeperPassword != null) {
                rawZookeeperPassword = PasswordEncoder.decode(rawZookeeperPassword);
            }
            password = password != null ? password : rawZookeeperPassword;
            StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
            encryptor.setAlgorithm(algorithm);
            encryptor.setPassword(password);
            System.out.println(String.format(FORMAT, message, algorithm, password, encryptor.encrypt(message)));
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.jasypt.encryption.pbe.StandardPBEStringEncryptor

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.