OPENDJ-2557 - use a secure PRNG when generating password content
Use SecureRandom() when generating password content in order to make
generated passwords less predictable. On *nix systems this
implementation will consume data from /dev/urandom which is slower than
using a PRNG and may also block if there is insufficient entropy.
However, password generation is a relatively rare event, so the
potential performance implications can be ignored.
| | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | | import java.security.SecureRandom; |
| | | import java.util.Random; |
| | | import java.util.SortedSet; |
| | | |
| | |
| | | public NamedCharacterSet(String name, char[] characters) |
| | | throws ConfigException |
| | | { |
| | | this(name, characters, new Random()); |
| | | this(name, characters, new SecureRandom()); |
| | | } |
| | | |
| | | |