Usecase: I want to mask input text(mainly password) in run.bat file, i am using java as programming language,overall my major objective is that whenever user provide input for password in run.batch it should be encrypted,is it possible to do so? Here is my run.batch file :
@echo OFF
setlocal DISABLEDELAYEDEXPANSION
java -jar "stack.jar" -username "stackoverflow" -password "qwerty@567" -configpath "config.ini"
pause
Here i want to mask qwerty@567 which is password given by user end Here is something that i tried but it works only for console
import java.io.Console;
public class Main {
public static void main(String[] args) {
Console console = System.console();
char[] passwordArray = console.readPassword("Enter your password: ");
console.printf("Password is: %s%n", new String(passwordArray));
}
}