public class PasswordUtil
extends java.lang.Object
Constructor and Description |
---|
PasswordUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
replacePassword(java.lang.String cmdLine,
java.lang.String passwordArg)
The method will replace password argument values with 'X' in a string
which represents command line arguments(arg=value arg2=value4).
|
static java.lang.String |
replacePasswords(java.lang.String string,
java.lang.String[] passwordArgs)
Does
replacePassword(String, String) for every argument given in
passwordArgs array. |
public static java.lang.String replacePassword(java.lang.String cmdLine, java.lang.String passwordArg)
cmdLine
- a string which represent command line arguments in a form
where each argument is separated by space and value is
assigned by '=' sign. For example "arg=value -arg2=value4
--arg3=val45".passwordArg
- the name of password argument to be shadowed.public static java.lang.String replacePasswords(java.lang.String string, java.lang.String[] passwordArgs)
replacePassword(String, String)
for every argument given in
passwordArgs array.string
- command line argument string, e.g. "arg=3 pass=secret"passwordArgs
- the array which contains the names of password
argument to be shadowed.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.