« Reading List: Dichronauts | Main | Flash, Bang! »
Thursday, August 24, 2017
RandomX Java Package Updated
The randomX package for Java implements an abstract (pseudo)random number generator which allows, by plugging in specific generators derived from it, a program to use a variety of random number sources, including Fourmilab's HotBits radioactive random number generator. At the start of July 2017, HotBits began to require an API Key to obtain truly random data from radioactive decay. This was necessary to prevent abuse and distributed denial of service attacks against the generator, whose capacity is limited due to the technology it employs. (Users can request an arbitrary amount of pseudorandom data, produced by a cryptographic-grade algorithm seeded with HotBits-generated data, without the need for an API Key.) I have just posted an updated version of the randomX package which adds the ability to specify an API Key when calling the randomHotBits constructor to create a new HotBits generator. If no API Key is specified, pseudorandom data will be returned. This update improves error diagnosis and reporting. If a request fails, for example due to an invalid API Key or the user having exceeded the daily quota for true random data, an HTML error page is returned. Previously, this resulted in an obscure error message from the generator method call. Now, the HTML error page is printed on standard error (admittedly, a bit arcane, but at least the reason for the error is primate-readable), and a RuntimeException is thrown.Posted at August 24, 2017 22:05