public final class PKCS5S2PasswordHashGenerator extends Object implements PasswordHashGenerator
Clients should not use this class directly, but pass an instance to DefaultPasswordEncoder.
This generator is safe for use on multiple threads because it creates a new instance of
the underlying generator for each call to generateHash(byte[], byte[]).
PKCS5S2ParametersGenerator| Constructor and Description |
|---|
PKCS5S2PasswordHashGenerator() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateHash(byte[] rawPassword,
byte[] salt)
Encodes the rawPassword bytes and salt according to their method specified
by the implementation.
|
int |
getRequiredSaltLength()
Returns the required salt length for this hash generator, zero if this generator does not
require a salt or -1 if the generator accepts salts of varying length.
|
public byte[] generateHash(byte[] rawPassword,
byte[] salt)
PasswordHashGeneratorgenerateHash in interface PasswordHashGeneratorrawPassword - the password to be encodedsalt - a salt which may be used by some algorithmspublic int getRequiredSaltLength()
PasswordHashGeneratorgetRequiredSaltLength in interface PasswordHashGeneratorCopyright © 2017 Atlassian. All rights reserved.