Java Code Examples for org.jasypt.encryption.pbe.StandardPBEStringEncryptor#setSaltGenerator()

The following examples show how to use org.jasypt.encryption.pbe.StandardPBEStringEncryptor#setSaltGenerator() . 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
/**
 * 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 StandardPBEStringEncryptor standardPBEStringEncryptor =
        (StandardPBEStringEncryptor) this.encryptor;
    standardPBEStringEncryptor.setSaltGenerator(saltGenerator);
}
 
Example 2
/**
 * 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 StandardPBEStringEncryptor standardPBEStringEncryptor =
        (StandardPBEStringEncryptor) this.encryptor;
    standardPBEStringEncryptor.setSaltGenerator(saltGenerator);
}
 
Example 3
/**
 * 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 StandardPBEStringEncryptor standardPBEStringEncryptor =
        (StandardPBEStringEncryptor) this.encryptor;
    standardPBEStringEncryptor.setSaltGenerator(saltGenerator);
}
 
Example 4
/**
 * 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 StandardPBEStringEncryptor standardPBEStringEncryptor =
        (StandardPBEStringEncryptor) this.encryptor;
    standardPBEStringEncryptor.setSaltGenerator(saltGenerator);
}