if ((paramAlgorithm != null) ||
(paramPassword != null) ||
(paramKeyObtentionIterations != null)) {
throw new EncryptionInitializationException(
"If \"" + ParameterNaming.ENCRYPTOR_NAME +
"\" is specified, none of \"" +
ParameterNaming.ALGORITHM + "\", \"" +
ParameterNaming.PASSWORD + "\" or \"" +
ParameterNaming.KEY_OBTENTION_ITERATIONS + "\" " +
"can be specified");
}
this.encryptorName = paramEncryptorName;
this.useEncryptorName = true;
} else if ((paramPassword != null)) {
this.password = paramPassword;
if (paramAlgorithm != null) {
this.algorithm = paramAlgorithm;
}
if (paramProviderName != null) {
this.providerName = paramProviderName;
}
if (paramKeyObtentionIterations != null) {
try {
this.keyObtentionIterations =
new Integer(
Integer.parseInt(paramKeyObtentionIterations));
} catch (NumberFormatException e) {
throw new EncryptionInitializationException(
"Value specified for \"" +
ParameterNaming.KEY_OBTENTION_ITERATIONS +
"\" is not a valid integer");
}
}
if (paramStringOutputType != null) {
this.stringOutputType = paramStringOutputType;
}
} else {
throw new EncryptionInitializationException(
"If \"" + ParameterNaming.ENCRYPTOR_NAME +
"\" is not specified, then \"" +
ParameterNaming.PASSWORD + "\" (and optionally \"" +
ParameterNaming.ALGORITHM + "\" and \"" +
ParameterNaming.KEY_OBTENTION_ITERATIONS + "\") " +