public interface Password extends Key, Cloneable
serialVersionUID
Modifier and Type | Method and Description |
---|---|
default <P extends Password,R> |
castAndApply(Class<P> passwordType,
Function<P,R> function)
Cast this password type and apply a function if the type matches.
|
default <P extends Password,R> |
castAndApply(Class<P> passwordType,
String algorithmName,
Function<P,R> function)
Cast this password type and apply a function if the type matches.
|
default <P extends Password> |
castAs(Class<P> passwordType)
Cast this password type if the type matches.
|
default <P extends Password> |
castAs(Class<P> passwordType,
String algorithmName)
Cast this password type if the type and algorithm matches.
|
Password |
clone()
Creates and returns a copy of this
Password . |
default AlgorithmParameterSpec |
getParameterSpec()
Get the applicable algorithm parameter specification for this password type.
|
default boolean |
impliesParameters(AlgorithmParameterSpec parameterSpec)
Determine if this password is matched by the given parameter specification.
|
getAlgorithm, getEncoded, getFormat
default <P extends Password> P castAs(Class<P> passwordType, String algorithmName)
P
- the password typepasswordType
- the password type class to checkalgorithmName
- the name of the algorithm or null
if any algorithm is acceptablenull
if the password does not match the criteriadefault <P extends Password> P castAs(Class<P> passwordType)
P
- the password typepasswordType
- the password type class to checknull
if the password does not match the criteriadefault <P extends Password,R> R castAndApply(Class<P> passwordType, String algorithmName, Function<P,R> function)
P
- the password typeR
- the return typepasswordType
- the password type class to checkalgorithmName
- the name of the algorithm or null
if any algorithm is acceptablefunction
- the function to applynull
if the password is not of the given typedefault <P extends Password,R> R castAndApply(Class<P> passwordType, Function<P,R> function)
P
- the password typeR
- the return typepasswordType
- the password type class to checkfunction
- the function to applynull
if the password is not of the given typedefault AlgorithmParameterSpec getParameterSpec()
null
if this password type does not support algorithmsdefault boolean impliesParameters(AlgorithmParameterSpec parameterSpec)
parameterSpec
- the parameter specification (must not be null
)true
if the password is matched by the parameters, false
otherwiseCopyright © 2017 JBoss by Red Hat. All rights reserved.