Package com.atlassian.security.password
Class RandomSaltGenerator
java.lang.Object
com.atlassian.security.password.RandomSaltGenerator
- All Implemented Interfaces:
SaltGenerator
Generates a salt using a static instance of
Random. Because Random is thread-safe,
salt generation using this class is also thread-safe.
Clients should not use this class directly, but pass an instance to DefaultPasswordEncoder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateSalt(int length) Returns a byte array of the required length containing a random salt value.
-
Constructor Details
-
RandomSaltGenerator
public RandomSaltGenerator()
-
-
Method Details
-
generateSalt
public byte[] generateSalt(int length) Description copied from interface:SaltGeneratorReturns a byte array of the required length containing a random salt value.- Specified by:
generateSaltin interfaceSaltGenerator
-