Class EncryptedPassword
java.lang.Object
com.github.jh3nd3rs0n.jargyle.common.security.EncryptedPassword
An encrypted password.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns theEncryptedPasswordSpec
of thisEncryptedPassword
.Returns theEncryptedPasswordValue
of thisEncryptedPassword
.char[]
Returns the decrypted password of thisEncryptedPassword
.Returns the name of the type of thisEncryptedPassword
.int
hashCode()
static EncryptedPassword
newInstance
(char[] password) Returns a newEncryptedPassword
of the provided password.static EncryptedPassword
newInstance
(String typeName, String encryptedPasswordValue) Returns a newEncryptedPassword
with the provided name of the type ofEncryptedPassword
specified by aEncryptedPasswordSpec
and with the parsedEncryptedPasswordValue
from the providedString
value.static EncryptedPassword
Returns a newEncryptedPassword
from the providedString
.toString()
Retyrns theString
representation of thisEncryptedPassword
.
-
Method Details
-
newInstance
Returns a newEncryptedPassword
of the provided password.- Parameters:
password
- the provided password- Returns:
- a new
EncryptedPassword
of the provided password
-
newInstanceFrom
Returns a newEncryptedPassword
from the providedString
. AnIllegalArgumentException
is thrown if the providedString
is invalid.- Parameters:
s
- the providedString
- Returns:
- a new
EncryptedPassword
from the providedString
-
newInstance
Returns a newEncryptedPassword
with the provided name of the type ofEncryptedPassword
specified by aEncryptedPasswordSpec
and with the parsedEncryptedPasswordValue
from the providedString
value. AnIllegalArgumentException
is thrown if the provided name of the type ofEncryptedPassword
is not specified by anyEncryptedPasswordSpec
or the providedString
value to be parsed as anEncryptedPasswordValue
is invalid.- Parameters:
typeName
- the provided name of the type ofEncryptedPassword
specified by aEncryptedPasswordSpec
encryptedPasswordValue
- the providedString
value to be parsed as anEncryptedPasswordValue
- Returns:
- a new
EncryptedPassword
with the provided name of the type ofEncryptedPassword
specified by aEncryptedPasswordSpec
and with the parsedEncryptedPasswordValue
from the providedString
value
-
equals
-
getEncryptedPasswordSpec
Returns theEncryptedPasswordSpec
of thisEncryptedPassword
.- Returns:
- the
EncryptedPasswordSpec
of thisEncryptedPassword
-
getEncryptedPasswordValue
Returns theEncryptedPasswordValue
of thisEncryptedPassword
.- Returns:
- the
EncryptedPasswordValue
of thisEncryptedPassword
-
getPassword
public char[] getPassword()Returns the decrypted password of thisEncryptedPassword
.- Returns:
- the decrypted password of this
EncryptedPassword
-
getTypeName
Returns the name of the type of thisEncryptedPassword
.- Returns:
- the name of the type of this
EncryptedPassword
-
hashCode
public int hashCode() -
toString
Retyrns theString
representation of thisEncryptedPassword
. TheString
representation is the name of the type of thisEncryptedPassword
followed by a colon (:) followed by theString
representation of theEncryptedPasswordValue
of thisEncryptedPassword
.
-