Package org.passay
Class PasswordUtils
- java.lang.Object
-
- org.passay.PasswordUtils
-
public final class PasswordUtils extends Object
Provides utility methods for this package.- Author:
- Middleware Services
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static char[]
concatArrays(char[] first, char[]... rest)
Concatenates multiple character arrays together.static int
countMatchingCharacters(String characters, String input)
Returns the number of characters in the supplied input that existing from the supplied characters string.static String
getMatchingCharacters(String characters, String input)
Returns all the characters in the input string that are also in the characters array.static String
getMatchingCharacters(String characters, String input, int maximumLength)
Returns all the characters in the input string that are also in the characters string.
-
-
-
Method Detail
-
getMatchingCharacters
public static String getMatchingCharacters(String characters, String input)
Returns all the characters in the input string that are also in the characters array.- Parameters:
characters
- that contains characters to matchinput
- to search for matches- Returns:
- matching characters or empty string
-
getMatchingCharacters
public static String getMatchingCharacters(String characters, String input, int maximumLength)
Returns all the characters in the input string that are also in the characters string.- Parameters:
characters
- that contains characters to matchinput
- to search for matchesmaximumLength
- maximum length of matching characters- Returns:
- matching characters or empty string
-
countMatchingCharacters
public static int countMatchingCharacters(String characters, String input)
Returns the number of characters in the supplied input that existing from the supplied characters string.- Parameters:
characters
- that contains characters to matchinput
- to search for matches- Returns:
- character count
-
concatArrays
public static char[] concatArrays(char[] first, char[]... rest)
Concatenates multiple character arrays together.- Parameters:
first
- array to concatenate. Cannot be null.rest
- of the arrays to concatenate. May be null.- Returns:
- array containing the concatenation of all parameters
-
-