/** * <p> * Sets the name by which this WebPBEConfig object will be identified * from the web. This name must be unique for each WebPBEConfig object. * </p> * * @param name the unique name which will identify this config object. */ public void setName(final String name) { CommonUtils.validateNotEmpty(name, "Name cannot be set empty"); this.name = name; }
/** * <p> * Sets the name by which this WebPBEConfig object will be identified * from the web. This name must be unique for each WebPBEConfig object. * </p> * * @param name the unique name which will identify this config object. */ public void setName(final String name) { CommonUtils.validateNotEmpty(name, "Name cannot be set empty"); this.name = name; }
/** * <p> * Sets the name by which this WebPBEConfig object will be identified * from the web. This name must be unique for each WebPBEConfig object. * </p> * * @param name the unique name which will identify this config object. */ public void setName(final String name) { CommonUtils.validateNotEmpty(name, "Name cannot be set empty"); this.name = name; }
/** * <p> * Sets the validation word which will be asked from the web to the * person setting the password for the encryptor this config object belongs * to. This validation word will make sure that only an authorized person * (for example, the application deployer) sets the value for the * encryption password. * </p> * * @param validation the validation word to be assigned to this config object */ public void setValidationWord(final String validation) { CommonUtils.validateNotEmpty(validation, "Validation word cannot be set empty"); this.validationWord = validation; }
/** * <p> * Sets the validation word which will be asked from the web to the * person setting the password for the encryptor this config object belongs * to. This validation word will make sure that only an authorized person * (for example, the application deployer) sets the value for the * encryption password. * </p> * * @param validation the validation word to be assigned to this config object */ public void setValidationWord(final String validation) { CommonUtils.validateNotEmpty(validation, "Validation word cannot be set empty"); this.validationWord = validation; }
/** * <p> * Sets the validation word which will be asked from the web to the * person setting the password for the encryptor this config object belongs * to. This validation word will make sure that only an authorized person * (for example, the application deployer) sets the value for the * encryption password. * </p> * * @param validation the validation word to be assigned to this config object */ public void setValidationWord(final String validation) { CommonUtils.validateNotEmpty(validation, "Validation word cannot be set empty"); this.validationWord = validation; }
/** * <p> * Sets the algorithm to be used for encryption, like * <tt>PBEWithMD5AndDES</tt>. * </p> * <p> * This algorithm has to be supported by your JCE provider (if you specify * one, or the default JVM provider if you don't) and, if it is supported, * you can also specify <i>mode</i> and <i>padding</i> for * it, like <tt>ALGORITHM/MODE/PADDING</tt>. * </p> * * @param algorithm the name of the algorithm to be used. */ public synchronized void setAlgorithm(String algorithm) { CommonUtils.validateNotEmpty(algorithm, "Algorithm cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.algorithm = algorithm; this.algorithmSet = true; }
/** * <p> * Sets the algorithm to be used for encryption, like * <tt>PBEWithMD5AndDES</tt>. * </p> * <p> * This algorithm has to be supported by your JCE provider (if you specify * one, or the default JVM provider if you don't) and, if it is supported, * you can also specify <i>mode</i> and <i>padding</i> for * it, like <tt>ALGORITHM/MODE/PADDING</tt>. * </p> * * @param algorithm the name of the algorithm to be used. */ public synchronized void setAlgorithm(String algorithm) { CommonUtils.validateNotEmpty(algorithm, "Algorithm cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.algorithm = algorithm; this.algorithmSet = true; }
/** * <p> * Sets the algorithm to be used for encryption, like * <tt>PBEWithMD5AndDES</tt>. * </p> * <p> * This algorithm has to be supported by your JCE provider (if you specify * one, or the default JVM provider if you don't) and, if it is supported, * you can also specify <i>mode</i> and <i>padding</i> for * it, like <tt>ALGORITHM/MODE/PADDING</tt>. * </p> * * @param algorithm the name of the algorithm to be used. */ public synchronized void setAlgorithm(String algorithm) { CommonUtils.validateNotEmpty(algorithm, "Algorithm cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.algorithm = algorithm; this.algorithmSet = true; }
/** * <p> * Sets the password to be used. * </p> * <p> * <b>There is no default value for password</b>, so not setting * this parameter either from a * {@link org.jasypt.encryption.pbe.config.PBEConfig} object or from * a call to <tt>setPassword</tt> will result in an * EncryptionInitializationException being thrown during initialization. * </p> * * @param password the password to be used. */ public synchronized void setPassword(String password) { CommonUtils.validateNotEmpty(password, "Password cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } if (this.password != null) { // We clean the old password, if there is one. cleanPassword(this.password); } this.password = password.toCharArray(); this.passwordSet = true; }
CommonUtils.validateNotEmpty(algorithm, "Algorithm cannot be empty"); if (isInitialized()) { throw new AlreadyInitializedException();
/** * <p> * Sets the password to be used. * </p> * <p> * <b>There is no default value for password</b>, so not setting * this parameter either from a * {@link org.jasypt.encryption.pbe.config.PBEConfig} object or from * a call to <tt>setPassword</tt> will result in an * EncryptionInitializationException being thrown during initialization. * </p> * * @param password the password to be used. */ public synchronized void setPassword(String password) { CommonUtils.validateNotEmpty(password, "Password cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } if (this.password != null) { // We clean the old password, if there is one. cleanPassword(this.password); } this.password = password.toCharArray(); this.passwordSet = true; }
CommonUtils.validateNotEmpty(algorithm, "Algorithm cannot be empty"); if (isInitialized()) { throw new AlreadyInitializedException();
/** * <p> * Sets the password to be used. * </p> * <p> * <b>There is no default value for password</b>, so not setting * this parameter either from a * {@link org.jasypt.encryption.pbe.config.PBEConfig} object or from * a call to <tt>setPassword</tt> will result in an * EncryptionInitializationException being thrown during initialization. * </p> * * @param password the password to be used. */ public synchronized void setPassword(String password) { CommonUtils.validateNotEmpty(password, "Password cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } if (this.password != null) { // We clean the old password, if there is one. cleanPassword(this.password); } this.password = password.toCharArray(); this.passwordSet = true; }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * * @since 1.3 * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { CommonUtils.validateNotEmpty(stringOutputType, "String output type cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.stringOutputType = CommonUtils. getStandardStringOutputType(stringOutputType); this.stringOutputTypeSet = true; }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * * @since 1.3 * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { CommonUtils.validateNotEmpty(stringOutputType, "String output type cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.stringOutputType = CommonUtils. getStandardStringOutputType(stringOutputType); this.stringOutputTypeSet = true; }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * * @since 1.3 * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { CommonUtils.validateNotEmpty(stringOutputType, "String output type cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.stringOutputType = CommonUtils. getStandardStringOutputType(stringOutputType); this.stringOutputTypeSet = true; }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * @since 1.3 * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { CommonUtils.validateNotEmpty(stringOutputType, "String output type cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.stringOutputType = CommonUtils. getStandardStringOutputType(stringOutputType); this.stringOutputTypeSet = true; }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * @since 1.3 * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { CommonUtils.validateNotEmpty(stringOutputType, "String output type cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.stringOutputType = CommonUtils. getStandardStringOutputType(stringOutputType); this.stringOutputTypeSet = true; }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * @since 1.3 * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { CommonUtils.validateNotEmpty(stringOutputType, "String output type cannot be set empty"); if (isInitialized()) { throw new AlreadyInitializedException(); } this.stringOutputType = CommonUtils. getStandardStringOutputType(stringOutputType); this.stringOutputTypeSet = true; }