[ 
https://issues.apache.org/jira/browse/RNG-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16920135#comment-16920135
 ] 

Alex D Herbert commented on RNG-19:
-----------------------------------

I agree that since a UniformRandomProvider cannot achieve the full 
functionality of Random (setting the seed and serialisation) then a conversion 
could lead to problems for someone. So avoid that.

Thus we just create the JDKRandomWrapper in the same location as 
JDKRandomBridge. The Javadoc should contain words to the effect of:
 * Use of Random is to be avoided as the RNG is surpassed by other PRNG classes
 * The class can be used to wrap a SecureRandom
 * SecureRandom offers access to the underlying OS source of randomness 
(platform dependent)

The final point should satisfy this ticket.

On another note Collections.shuffle will not suffer performance loss when using 
a non-array lists as it detects instances of List without \{{RandomAccess}} and 
changes behaviour. If using a LinkedList the ListSampler.shuffle algorithm will 
suffer from quadratic run-time behaviour. I will create a ticket to correct 
this.

> System generator (/dev/random)
> ------------------------------
>
>                 Key: RNG-19
>                 URL: https://issues.apache.org/jira/browse/RNG-19
>             Project: Commons RNG
>          Issue Type: Wish
>            Reporter: Emmanuel Bourg
>            Priority: Minor
>
> Commons RNG could include a random number generator based on the output of 
> /dev/random or /dev/urandom on Unix systems.
> Commons Crypto has an implementation that could be used as a starting point:
> https://github.com/apache/commons-crypto/blob/master/src/main/java/org/apache/commons/crypto/random/OsCryptoRandom.java



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to