com.atlassian.security.password
Interface PasswordHashGenerator

All Known Implementing Classes:
PKCS5S2PasswordHashGenerator

public interface PasswordHashGenerator

Used by DefaultPasswordEncoder to generate encoded password bytes.


Method Summary
 byte[] generateHash(byte[] password, 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.
 

Method Detail

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 encoded
salt - 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.



Copyright © 2014 Atlassian. All Rights Reserved.