Package com.atlassian.security.password
Interface PasswordHashGenerator
- All Known Implementing Classes:
PKCS5S2PasswordHashGenerator
public interface PasswordHashGenerator
Used by
DefaultPasswordEncoder to generate encoded password bytes.-
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateHash(byte[] password, byte[] salt) Encodes the rawPassword bytes and salt according to their method specified by the implementation.intReturns 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.
-
Method Details
-
generateHash
byte[] generateHash(byte[] password, byte[] salt) Encodes the rawPassword bytes and salt according to their method specified by the implementation. The encoded bytes should be returned without including the salt.- Parameters:
password- the password to be encodedsalt- a salt which may be used by some algorithms- Returns:
- the encoded password bytes (without appending or prepending the salt)
-
getRequiredSaltLength
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.
-