Java Code Examples for org.jasypt.encryption.pbe.StandardPBEByteEncryptor

The following examples show how to use org.jasypt.encryption.pbe.StandardPBEByteEncryptor. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jasypt   Author: jasypt   File: TestHibernateTypes.java    License: Apache License 2.0 6 votes vote down vote up
private void registerEncryptors() {
    StandardPBEStringEncryptor stringEncryptor = new StandardPBEStringEncryptor();
       stringEncryptor.setAlgorithm("PBEWithMD5AndDES");
       stringEncryptor.setPassword("jasypt-hibernate5-test");
               
       StandardPBEByteEncryptor byteEncryptor = new StandardPBEByteEncryptor();
       byteEncryptor.setAlgorithm("PBEWithMD5AndDES");
       byteEncryptor.setPassword("jasypt-hibernate5-test");
       
       StandardPBEBigIntegerEncryptor bigIntegerEncryptor = new StandardPBEBigIntegerEncryptor();
       bigIntegerEncryptor.setAlgorithm("PBEWithMD5AndDES");
       bigIntegerEncryptor.setPassword("jasypt-hibernate5-test");
       
       StandardPBEBigDecimalEncryptor bigDecimalEncryptor = new StandardPBEBigDecimalEncryptor();
       bigDecimalEncryptor.setAlgorithm("PBEWithMD5AndDES");
       bigDecimalEncryptor.setPassword("jasypt-hibernate5-test");
       
       HibernatePBEEncryptorRegistry registry =
           HibernatePBEEncryptorRegistry.getInstance();
       registry.registerPBEStringEncryptor("hibernateStringEncryptor", stringEncryptor);
       registry.registerPBEByteEncryptor("hibernateByteEncryptor", byteEncryptor);
       registry.registerPBEBigIntegerEncryptor("hibernateBigIntegerEncryptor", bigIntegerEncryptor);
       registry.registerPBEBigDecimalEncryptor("hibernateBigDecimalEncryptor", bigDecimalEncryptor);
}
 
Example #2
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param password the password to be set for the internal encryptor
 */
public void setPassword(final String password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPassword(password);
}
 
Example #3
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor (as a char[]), if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 *
 * @since 1.8
 * @param password the password to be set for the internal encryptor
 */
public void setPasswordCharArray(final char[] password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPasswordCharArray(password);
}
 
Example #4
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the algorithm to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param algorithm the algorithm to be set for the internal encryptor
 */
public void setAlgorithm(final String algorithm) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setAlgorithm(algorithm);
}
 
Example #5
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the key obtention iterations to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param keyObtentionIterations to be set for the internal encryptor
 */
public void setKeyObtentionIterations(final int keyObtentionIterations) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setKeyObtentionIterations(
            keyObtentionIterations);
}
 
Example #6
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the salt generator to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param saltGenerator the salt generator to be set for the internal
 *                      encryptor.
 */
public void setSaltGenerator(final SaltGenerator saltGenerator) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setSaltGenerator(saltGenerator);
}
 
Example #7
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the IV generator to be used by the internal encryptor,
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 *
 * @param ivGenerator the IV generator to be set for the internal
 *                      encryptor.
 */
public void setIvGenerator(final IvGenerator ivGenerator) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
            "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setIvGenerator(ivGenerator);
}
 
Example #8
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the PBEConfig to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param config the PBEConfig to be set for the internal encryptor
 */
public void setConfig(final PBEConfig config) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setConfig(config);
}
 
Example #9
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param password the password to be set for the internal encryptor
 */
public void setPassword(final String password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPassword(password);
}
 
Example #10
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor (as a char[]), if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 *
 * @since 1.8
 * @param password the password to be set for the internal encryptor
 */
public void setPasswordCharArray(final char[] password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPasswordCharArray(password);
}
 
Example #11
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the algorithm to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param algorithm the algorithm to be set for the internal encryptor
 */
public void setAlgorithm(final String algorithm) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setAlgorithm(algorithm);
}
 
Example #12
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the key obtention iterations to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param keyObtentionIterations to be set for the internal encryptor
 */
public void setKeyObtentionIterations(final int keyObtentionIterations) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setKeyObtentionIterations(
            keyObtentionIterations);
}
 
Example #13
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the salt generator to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param saltGenerator the salt generator to be set for the internal
 *                      encryptor.
 */
public void setSaltGenerator(final SaltGenerator saltGenerator) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setSaltGenerator(saltGenerator);
}
 
Example #14
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the IV generator to be used by the internal encryptor,
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 *
 * @param ivGenerator the IV generator to be set for the internal
 *                      encryptor.
 */
public void setIvGenerator(final IvGenerator ivGenerator) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
            "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setIvGenerator(ivGenerator);
}
 
Example #15
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the PBEConfig to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param config the PBEConfig to be set for the internal encryptor
 */
public void setConfig(final PBEConfig config) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setConfig(config);
}
 
Example #16
Source Project: jasypt   Author: jasypt   File: TestHibernateTypes.java    License: Apache License 2.0 5 votes vote down vote up
private void registerEncryptors() {
    StandardPBEStringEncryptor stringEncryptor = new StandardPBEStringEncryptor();
       stringEncryptor.setAlgorithm("PBEWithMD5AndDES");
       stringEncryptor.setPassword("jasypt-hibernate3-test");
               
       StandardPBEByteEncryptor byteEncryptor = new StandardPBEByteEncryptor();
       byteEncryptor.setAlgorithm("PBEWithMD5AndDES");
       byteEncryptor.setPassword("jasypt-hibernate3-test");
       
       HibernatePBEEncryptorRegistry registry =
           HibernatePBEEncryptorRegistry.getInstance();
       registry.registerPBEStringEncryptor("hibernateStringEncryptor", stringEncryptor);
       registry.registerPBEByteEncryptor("hibernateByteEncryptor", byteEncryptor);
}
 
Example #17
Source Project: jasypt   Author: jasypt   File: AES256BinaryEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance of <tt>StrongBinaryEncryptor</tt>.
 */
public AES256BinaryEncryptor() {
    super();
    this.encryptor = new StandardPBEByteEncryptor();
    this.encryptor.setAlgorithm("PBEWithHMACSHA512AndAES_256");
    this.encryptor.setIvGenerator(new RandomIvGenerator());
}
 
Example #18
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param password the password to be set for the internal encryptor
 */
public void setPassword(final String password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPassword(password);
}
 
Example #19
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor (as a char[]), if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 *
 * @since 1.8
 * @param password the password to be set for the internal encryptor
 */
public void setPasswordCharArray(final char[] password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPasswordCharArray(password);
}
 
Example #20
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the algorithm to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param algorithm the algorithm to be set for the internal encryptor
 */
public void setAlgorithm(final String algorithm) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setAlgorithm(algorithm);
}
 
Example #21
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the key obtention iterations to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param keyObtentionIterations to be set for the internal encryptor
 */
public void setKeyObtentionIterations(final int keyObtentionIterations) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setKeyObtentionIterations(
            keyObtentionIterations);
}
 
Example #22
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the salt generator to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param saltGenerator the salt generator to be set for the internal
 *                      encryptor.
 */
public void setSaltGenerator(final SaltGenerator saltGenerator) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setSaltGenerator(saltGenerator);
}
 
Example #23
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the PBEConfig to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param config the PBEConfig to be set for the internal encryptor
 */
public void setConfig(final PBEConfig config) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setConfig(config);
}
 
Example #24
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param password the password to be set for the internal encryptor
 */
public void setPassword(final String password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPassword(password);
}
 
Example #25
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the password to be used by the internal encryptor (as a char[]), if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 *
 * @since 1.8
 * @param password the password to be set for the internal encryptor
 */
public void setPasswordCharArray(final char[] password) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setPasswordCharArray(password);
}
 
Example #26
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the algorithm to be used by the internal encryptor, if a specific
 * encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param algorithm the algorithm to be set for the internal encryptor
 */
public void setAlgorithm(final String algorithm) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setAlgorithm(algorithm);
}
 
Example #27
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the key obtention iterations to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param keyObtentionIterations to be set for the internal encryptor
 */
public void setKeyObtentionIterations(final int keyObtentionIterations) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setKeyObtentionIterations(
            keyObtentionIterations);
}
 
Example #28
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the salt generator to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param saltGenerator the salt generator to be set for the internal
 *                      encryptor.
 */
public void setSaltGenerator(final SaltGenerator saltGenerator) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setSaltGenerator(saltGenerator);
}
 
Example #29
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the IV generator to be used by the internal encryptor,
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 *
 * @param ivGenerator the IV generator to be set for the internal
 *                      encryptor.
 */
public void setIvGenerator(final IvGenerator ivGenerator) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
            "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setIvGenerator(ivGenerator);
}
 
Example #30
Source Project: jasypt   Author: jasypt   File: HibernatePBEByteEncryptor.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sets the PBEConfig to be used by the internal encryptor, 
 * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>.
 * 
 * @param config the PBEConfig to be set for the internal encryptor
 */
public void setConfig(final PBEConfig config) {
    if (this.encryptorSet) {
        throw new EncryptionInitializationException(
                "An encryptor has been already set: no " +
                "further configuration possible on hibernate wrapper");
    }
    final StandardPBEByteEncryptor standardPBEByteEncryptor =
        (StandardPBEByteEncryptor) this.encryptor;
    standardPBEByteEncryptor.setConfig(config);
}