-1

It hangs on my machine when built from the git tag:

mvn -version
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T19:33:14+01:00)
Maven home: /usr/local/apache-maven-3.5.4
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-141-generic", arch: "amd64", family: "unix"

git clone https://gitbox.apache.org/repos/asf/commons-codec.git

git checkout commons-codec-1.12-RC2

mvn test


First hangs at: org.apache.commons.codec.digest.Md5CryptTest

This has a test that eventually calls B64.getRandomSalt, which I can confirm in the code is using SecureRandom. getInstanceStrong() and the Javadoc states this.


BTW: If the intention is to have the generation of the salt as a fast method then you can:

- Avoid StringBuilder and just write to a char[] (which is then passed to new String(char[]) at the end)

- Create 5 * 6-bit base 64 characters per sample from nextInt()

For most of the default 8 character salts that will reduce the calls to nextInt() from 8 down to 2. I can provide code if required.

This is based on speed tests I did for commons-rng for Hex string generation and later for any base 2 radix string. The ticket is still open here:

https://issues.apache.org/jira/browse/RNG-54

Regards,

Alex


On 08/02/2019 12:12, Gilles Sadowski wrote:
Le ven. 8 févr. 2019 à 12:36, sebb <seb...@gmail.com> a écrit :
-1 to the release:
The Javadoc does not mention that "SecureRandom" is used
by default.

And... where is the branch?

Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to