we know that there are two options to let SecureRandom
to use /dev/urandom
instead of /dev/random
:
JRE_PATH/lib/security/java.security
file-Djava.security.egd
but which one take effect when setting both ?
The documentation in <java_dir>/jre/lib/security/java.security
clearly says:
The entropy gathering device can also be specified with the System property "java.security.egd". For example:
% java -Djava.security.egd=file:/dev/random MainClass
Specifying this System property will override the "securerandom.source" Security property.
So the system property will always have precedence when set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With