DefaultHashService.setGeneratePublicSalt

Sets whether or not a public salt should be randomly generated and used to compute a hash if a {@link HashRequest} does not specify a salt. <p/> The default value is {@code false} but should definitely be set to {@code true} if the {@code HashService} instance is being used for password hashing. <p/> <b>NOTE:</b> this property only has an effect if a {@link #getPrivateSalt() privateSalt} is NOT configured. If a private salt has been configured and a request does not provide a salt, a random salt will always be generated to protect the integrity of the private salt (without a public salt, the private salt would be exposed as-is, which is undesirable).

@param generatePublicSalt whether or not a public salt should be randomly generated and used to compute a hash if a {@link HashRequest} does not specify a salt.

class DefaultHashService
void
setGeneratePublicSalt

Meta