/** * <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 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 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; }
System.arraycopy(configPassword, 0, this.password, 0, configPassword.length); this.passwordSet = true; cleanPassword(configPassword);
System.arraycopy(configPassword, 0, this.password, 0, configPassword.length); this.passwordSet = true; cleanPassword(configPassword);
System.arraycopy(configPassword, 0, this.password, 0, configPassword.length); this.passwordSet = true; cleanPassword(configPassword);
cleanPassword(this.password);
cleanPassword(this.password);
cleanPassword(this.password);
cleanPassword(this.password); cleanPassword(normalizedPassword);
cleanPassword(this.password); cleanPassword(normalizedPassword);
cleanPassword(this.password); cleanPassword(normalizedPassword);
cleanPassword(copiedPassword);
cleanPassword(copiedPassword);