Skip to content

Commit

Permalink
renames masterPassword and secret
Browse files Browse the repository at this point in the history
  • Loading branch information
mvomiero committed Mar 21, 2024
1 parent efbbe57 commit f958fe1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions cli/src/main/java/com/devonfw/tools/ide/tool/jasypt/Jasypt.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public class Jasypt extends LocalToolCommandlet {

public final EnumProperty<JasyptCommand> command;

public final PasswordProperty password;
public final PasswordProperty masterPassword;

public final PasswordProperty input;
public final PasswordProperty secret;

private static final String CLASS_NAME_ENCRYPTION = "org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI";

Expand All @@ -37,8 +37,8 @@ public Jasypt(IdeContext context) {
super(context, "jasypt", Set.of(Tag.JAVA, Tag.ENCRYPTION));

this.command = add(new EnumProperty<>("", true, "command", JasyptCommand.class));
this.password = add(new PasswordProperty("", true, "password"));
this.input = add(new PasswordProperty("", true, "input"));
this.masterPassword = add(new PasswordProperty("", true, "masterPassword"));
this.secret = add(new PasswordProperty("", true, "secret"));
}

@Override
Expand Down Expand Up @@ -91,7 +91,7 @@ private void runJasypt(String className) {
String generatorClassName = jasyptOptions[1];

java.runTool(null, "-cp", resolveJasyptJarPath().toString(), className, algorithm, generatorClassName,
"password=" + this.password.getValue(), "input=" + this.input.getValue());
"password=" + this.masterPassword.getValue(), "input=" + this.secret.getValue());
}

private Path resolveJasyptJarPath() {
Expand Down
4 changes: 2 additions & 2 deletions cli/src/main/resources/nls/Ide.properties
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ val-args=The commandline arguments to pass to the tool.
val-edition=The tool edition.
val-sonar-command=START|STOP|ANALYZE
val-jasypt-command=encrypt | decrypt
val-jasypt-password=password
val-jasypt-input=The input text to be encrypted or decrypted
val-jasypt-masterPassword=master password
val-jasypt-secret=The secret to be encrypted or decrypted
val-tool=The tool commandlet to select.
val-version=The tool version
val-set-version-version=The tool version to set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void testJasyptRun() {
Jasypt commandlet = new Jasypt(context);

commandlet.command.setValue(JasyptCommand.ENCRYPT);
commandlet.password.setValue("password");
commandlet.input.setValue("input");
commandlet.masterPassword.setValue("password");
commandlet.secret.setValue("input");

// act
commandlet.run();
Expand Down

0 comments on commit f958fe1

Please sign in to comment.