Skip to content

Julia Language functions to obtain random numbers from RANDOM.ORG using an HTTP interface.

License

Notifications You must be signed in to change notification settings

edwcarney/RandomDotOrg.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RandomDotOrg.jl

Julia module with functions to provide support for obtaining random numbers generated by the RANDOM.ORG (RDO) website using HTTP. Freely adapted and extended from the random package in R, written by Dirk Eddelbuettel edd@debian.org. An API version is available at the following repository: https://github.com/edwcarney/RandomDotOrgAPI.jl

From the RANDOM.ORG FAQ (Q4.1):

The RANDOM.ORG setup uses an array of radios that pick up atmospheric noise. Each radio generates approximately 12,000 bits per second. The random bits produced by the radios are used as the raw material for all the different generators you see on RANDOM.ORG. Each time you use one of the generators, you spend some bits. By enforcing a limit on the number of bits you can use per day, the quota system prevents any one person from hogging all the numbers. (Believe us, this was a big problem before we implemented the quota system.)

Current functions

getQuota()—obtain current bit quota for your IP
checkQuota()—check if quota is non-zero
random_numbers()—obtain integers
random_sequence()—obtain randomized sequences of integers 1..N
random_strings()—obtain random strings of characters (upper/lower case letters, digits)
random_gaussian()—obtain random Gaussian numbers
random_decimal_fractions()—obtain random numbers on the interval (0,1)
random_bytes()—obtain random bytes in various formats
random_bitmap()—obtain a random bitmap of size up to 300 x 300 as GIF or PNG

Simply include the file with include("RandomDotOrg.jl"). You may also install the module from GitHub using
Pkg.add(url="https://github.com/edwcarney/RandomDotOrg.jl") in the Julia REPL
or use add "https://github.com/edwcarney/RandomDotOrg.jl" in the Pkg REPL

Values are returned in vector arrays of integers or strings.

The use of secure HTTP by RANDOM.ORG prevents interception while the numbers are in transit. However, it is probably best not to use the Random.org site for any purpose that might have a direct impact on security. The FAQ (Q2.4) on the website says the following: "We should probably note that while fetching the numbers via secure HTTP would protect them from being observed while in transit, anyone genuinely concerned with security should not trust anyone else (including RANDOM.ORG) to generate their cryptographic keys."

using HTTP, Printf

About

Julia Language functions to obtain random numbers from RANDOM.ORG using an HTTP interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages