Package tv.hd3g.authkit.mod.dto
Class Password
- java.lang.Object
-
- tv.hd3g.authkit.mod.dto.Password
-
- All Implemented Interfaces:
CharSequence
public class Password extends Object implements CharSequence
-
-
Constructor Summary
Constructors Constructor Description Password(CharSequence value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description charcharAt(int index)voidcheckComplexity(int minSize, boolean mustHaveSpecialChars)voidcheckComplexity(int minSize, boolean mustHaveSpecialChars, String genericTermPresenceToIgnore)static voidcheckSomeComplexity(int minSize, boolean mustHaveSpecialChars, char[] value)booleancontain(String term)Don't modify internal password.static booleancontainCharArray(char[] term, char[] value)Don't manage complex UTF-16 chars.Passwordduplicate()booleanequals(Object obj)static booleanequalsInsensitive(char[] l, char[] r)Stringhash(Function<char[],String> hasher)inthashCode()intlength()voidreset()CharSequencesubSequence(int start, int end)StringtoString()booleanverify(de.mkammerer.argon2.Argon2 argon2, String passwordHash)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
-
-
-
Constructor Detail
-
Password
public Password(CharSequence value)
-
-
Method Detail
-
toString
public String toString()
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
length
public int length()
- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index)
- Specified by:
charAtin interfaceCharSequence
-
subSequence
public CharSequence subSequence(int start, int end)
- Specified by:
subSequencein interfaceCharSequence
-
reset
public void reset()
-
verify
public boolean verify(de.mkammerer.argon2.Argon2 argon2, String passwordHash)
-
duplicate
public Password duplicate()
-
equalsInsensitive
public static boolean equalsInsensitive(char[] l, char[] r)
-
containCharArray
public static boolean containCharArray(char[] term, char[] value)Don't manage complex UTF-16 chars. Don't clear term or value after use.- Returns:
- true if it find term in value.
-
contain
public boolean contain(String term)
Don't modify internal password. Don't manage complex UTF-16 chars.- Returns:
- true if it find term in internal password.
-
checkComplexity
public void checkComplexity(int minSize, boolean mustHaveSpecialChars, String genericTermPresenceToIgnore) throws PasswordComplexityException- Throws:
PasswordComplexityException
-
checkSomeComplexity
public static void checkSomeComplexity(int minSize, boolean mustHaveSpecialChars, char[] value) throws PasswordComplexityException- Throws:
PasswordComplexityException
-
checkComplexity
public void checkComplexity(int minSize, boolean mustHaveSpecialChars) throws PasswordComplexityException- Throws:
PasswordComplexityException
-
-