/** * Returns {@code true} if the specified string doesn't start with a * valid algorithm name in curly brackets. * * @param password The string to be tested. * @return {@code true} if the specified string doesn't start with a * valid algorithm name in curly brackets. */ public static boolean isPlainTextPassword(@Nullable String password) { return extractAlgorithm(password) == null; }
/** * Returns {@code true} if the specified string doesn't start with a * valid algorithm name in curly brackets. * * @param password The string to be tested. * @return {@code true} if the specified string doesn't start with a * valid algorithm name in curly brackets. */ public static boolean isPlainTextPassword(@Nullable String password) { return extractAlgorithm(password) == null; }
String algorithm = extractAlgorithm(hashedPassword); if (algorithm != null) { int startPos = algorithm.length()+2;
String algorithm = extractAlgorithm(hashedPassword); if (algorithm != null) { int startPos = algorithm.length()+2;