public abstract class PasswordFactorySpi extends Object
Modifier | Constructor and Description |
---|---|
protected |
PasswordFactorySpi()
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract <S extends KeySpec> |
engineConvertibleToKeySpec(String algorithm,
Password password,
Class<S> keySpecType)
Determine whether the given password object is convertible to the given key specification type.
|
protected abstract Password |
engineGeneratePassword(String algorithm,
KeySpec keySpec)
Generate a password from the given key specification.
|
protected abstract <S extends KeySpec> |
engineGetKeySpec(String algorithm,
Password password,
Class<S> keySpecType)
Get a key specification for the given password object.
|
protected abstract boolean |
engineIsTranslatablePassword(String algorithm,
Password password)
Determine whether the given password can be translated into one which is consumable by this factory.
|
protected abstract Password |
engineTransform(String algorithm,
Password password,
AlgorithmParameterSpec parameterSpec)
Transform a password with new parameters.
|
protected abstract Password |
engineTranslatePassword(String algorithm,
Password password)
Translate a password object into one which is supported by this engine.
|
protected abstract boolean |
engineVerify(String algorithm,
Password password,
char[] guess)
Perform password verification.
|
protected abstract Password engineGeneratePassword(String algorithm, KeySpec keySpec) throws InvalidKeySpecException
algorithm
- the password algorithmkeySpec
- the key specificationInvalidKeySpecException
- if the key specification is not supportedprotected abstract <S extends KeySpec> S engineGetKeySpec(String algorithm, Password password, Class<S> keySpecType) throws InvalidKeySpecException
S
- the key specification typealgorithm
- the password algorithmpassword
- the password objectkeySpecType
- the key specification classInvalidKeySpecException
- if the key specification type is not supportedprotected abstract boolean engineIsTranslatablePassword(String algorithm, Password password)
true
, then engineTranslatePassword(String, Password)
must succeed.password
- the password objecttrue
if the given password is supported by this algorithm, false
otherwiseprotected abstract Password engineTranslatePassword(String algorithm, Password password) throws InvalidKeyException
algorithm
- the password algorithmpassword
- the password objectInvalidKeyException
- if the given password type is not supportedprotected abstract boolean engineVerify(String algorithm, Password password, char[] guess) throws InvalidKeyException
algorithm
- the password algorithmpassword
- the password objectguess
- the guessed passwordtrue
if the password matches, false
otherwiseInvalidKeyException
- if the given password type is not supportedprotected abstract <S extends KeySpec> boolean engineConvertibleToKeySpec(String algorithm, Password password, Class<S> keySpecType)
S
- the key specification typealgorithm
- the password algorithmpassword
- the password objectkeySpecType
- the key specification classtrue
if the password is convertible, false
otherwiseprotected abstract Password engineTransform(String algorithm, Password password, AlgorithmParameterSpec parameterSpec) throws InvalidKeyException, InvalidAlgorithmParameterException
algorithm
- the password algorithmpassword
- the passwordparameterSpec
- the new parametersInvalidKeyException
- if the given password is invalidInvalidAlgorithmParameterException
- if the transformation cannot be applied to the given parametersCopyright © 2020 JBoss by Red Hat. All rights reserved.