Package org.jitsi.utils
Class PasswordUtil
-
- All Implemented Interfaces:
public class PasswordUtilThe utility class which can be used to clear passwords values from 'sun.java.command' system property.
Pawel Domas
-
-
Constructor Summary
Constructors Constructor Description PasswordUtil()
-
Method Summary
Modifier and Type Method Description static StringreplacePassword(String cmdLine, String passwordArg)The method will replace password argument values with 'X' in a string which represents command line arguments(arg=value arg2=value4). static StringreplacePasswords(String string, Array<String> passwordArgs)Does replacePassword for every argument given in passwordArgs array. -
-
Method Detail
-
replacePassword
static String replacePassword(String cmdLine, String passwordArg)
The method will replace password argument values with 'X' in a string which represents command line arguments(arg=value arg2=value4).
- Parameters:
cmdLine- a string which represent command line arguments in a form where each argument is separated by space and value is assigned by '=' sign.passwordArg- the name of password argument to be shadowed.- Returns:
cmdLine string with password argument values shadowed by 'X'
-
replacePasswords
static String replacePasswords(String string, Array<String> passwordArgs)
Does replacePassword for every argument given in passwordArgs array.
- Parameters:
string- command line argument string, e.g.passwordArgs- the array which contains the names of password argument to be shadowed.- Returns:
cmdLine string with password arguments values shadowed by 'X'
-
-
-
-