{"id":21513251,"url":"https://github.com/patrickfav/dice","last_synced_at":"2025-04-09T18:53:27.882Z","repository":{"id":23958348,"uuid":"100255165","full_name":"patrickfav/dice","owner":"patrickfav","description":"A cryptographically secure pseudorandom number generator cli tool printing in a wide variety of byte encodings (hex, base64,..) and for many programming languages (c, java, c#, php, etc.)  using NIST SP800-90Ar1 HMAC-DRBG. Supports external seeding from various true random services.","archived":false,"fork":false,"pushed_at":"2023-09-25T15:54:38.000Z","size":40857,"stargazers_count":14,"open_issues_count":4,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-23T20:51:16.586Z","etag":null,"topics":["base32","base36","base64","base85","cli","encoding","entropy-source","hex","hmac-drbg","hotbits","java","nist","octal","prng","random-number-generators","seed","sp800-90a","text-encodings"],"latest_commit_sha":null,"homepage":"https://favr.dev/opensource/dice","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickfav.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-14T10:19:05.000Z","updated_at":"2025-01-06T17:55:43.000Z","dependencies_parsed_at":"2022-08-17T21:31:09.608Z","dependency_job_id":null,"html_url":"https://github.com/patrickfav/dice","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickfav%2Fdice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickfav%2Fdice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickfav%2Fdice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickfav%2Fdice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickfav","download_url":"https://codeload.github.com/patrickfav/dice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248093512,"owners_count":21046696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base32","base36","base64","base85","cli","encoding","entropy-source","hex","hmac-drbg","hotbits","java","nist","octal","prng","random-number-generators","seed","sp800-90a","text-encodings"],"created_at":"2024-11-23T22:55:11.396Z","updated_at":"2025-04-09T18:53:22.864Z","avatar_url":"https://github.com/patrickfav.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dice\n\nA cryptographically secure pseudo-random number generator [CLI](https://en.wikipedia.org/wiki/Command-line_interface) tool which generates byte arrays with entropy from the best random source from your machine* optionally externally seeded by multiple true random number generators and supports various [byte-to-text encodings](https://en.wikipedia.org/wiki/Binary-to-text_encoding) like [hex](https://en.wikipedia.org/wiki/Hexadecimal#Transfer_encoding) or [base64](https://en.wikipedia.org/wiki/Base64) and for many programming languages. The output may be printed to the command line or to a file. This implementation uses the HMAC Deterministic Random Bit Generator (DRBG) schema as defined in [NIST](https://www.nist.gov/)  [SP800-90Ar1](http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf).\n\n[![GitHub release](https://img.shields.io/github/release/patrickfav/dice.svg)](https://github.com/patrickfav/dice/releases/latest)\n[![Github Actions](https://github.com/patrickfav/dice/actions/workflows/build.yml/badge.svg)](https://github.com/patrickfav/dice/actions)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=patrickfav_dice\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=patrickfav_dice)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=patrickfav_dice\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=patrickfav_dice)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=patrickfav_dice\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=patrickfav_dice)\n\n\u003csup\u003e* depending on the used [provider](https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SecureRandomImp)\u003c/sup\u003e\n\n ![logo](misc/icon.png)\n\n**Main features:**\n\n * Supports all common byte encodings and more (hex, [base32](https://en.wikipedia.org/wiki/Base32), [base36](https://en.wikipedia.org/wiki/Base36), base64, [base85](https://en.wikipedia.org/wiki/Ascii85#RFC_1924_version), etc.)\n * Optional secure seeding of random generator with [random.org](https://www.random.org/) and [ANU Quantum Random Numbers Server](https://qrng.anu.edu.au/)\n * Generates code for random byte arrays for many programming languages (java, c, c#, kotlin, python, swift, go,...)\n * [NIST SP800-90Ar1 HMAC_DRBG](http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf) tested with official [test vectors](https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program)\n * Output to command line or file with automatic column formatting with upper limit of 10GiB+ of random data (~20MiB/s)\n * Entropy warnings if seed is weak\n * Additional output configuration like \"[www-form-urlencoding](https://en.wikipedia.org/wiki/Percent-encoding)\", padding of output and appended [crc32 checksum](https://en.wikipedia.org/wiki/Cyclic_redundancy_check)\n\nExample usage generating randoms with 24 _byte-length_ (not char length) and default encoding:\n\n    java -jar dice.jar 24\n\n_More examples:_\n    \n    java -jar dice.jar 16 --count 100\n    java -jar dice.jar 16 --encoding \"base64\"\n    java -jar dice.jar 16 --encoding \"java\"\n    java -jar dice.jar 4096 --encoding \"raw\" --count 1024 --file \"./rnd-4-MiB-outputfile.txt\"\n    java -jar dice.jar 16 --seed \"myBadRandomSeed\"\n    java -jar dice.jar 16 --offline\n    java -jar dice.jar 32 --encoding \"base85\" --urlencode --padding --crc32\n\nThis should run on any Windows, Mac or Linux machine.\n\n### Requirements\n\n* [Java Runtime Environment (JRE) 8](http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html)\n\n## Download\n\n**[Grab jar from the latest Release](https://github.com/patrickfav/dice/releases/latest)**\n\n_Using the *.exe Launcher: [Launch4J](http://launch4j.sourceforge.net/) is used to wrap the `.jar` into a Windows executable. It should automatically download the needed JRE if required._\n\n## Demo\n\n[![asciicast](https://asciinema.org/a/140170.png)](https://asciinema.org/a/140170)\n\n## Use Cases\n\n### Creating Nonces, Tokens, Identifiers or Passwords\n\nI'll recommend `base32`, `base36` or `base58` because these encodings are typically url-safe. 16 byte usually suffice for globally unique, infeasible to brute force number.\n\n    java -jar dice.jar 16 -e \"base36\"\n\nIf you require fixed char-sized output either use `hex` encoding or other encodings supporting paddings like `base32` or `base64`. For passwords, high-density encodings are recommended like `base85`.\n\n### Creating static byte arrays for your application\n\nYou can create static salts, or randoms to hardcode, in your code. Just pick\nyour programming language to get the correct syntax (see below). E.g.:\n\n    java -jar dice.jar 16 -e \"java\"\n\n### Creating files of entropy\n\nCreate a file 4MiB full of raw random bytes with this call:\n\n    java -jar dice.jar 4096 -c 1024 -e \"raw\" -f \"./rnd-outfile.txt\"\n\nThis will create random chunks of 4Kib (the maximum allowed size per chunk) repeated 1024 times. Currently, the tool is capped to 10 GiB of generated random data per call. Successive calls will append data, not overwrite it. \n\n## Command Line Interface\n\n       --anuquantum             Enable external, supposed true random generator ANU Quantum; note this service is known\n                                to be slow (only when online).\n    -c,--count \u003cnumber\u003e         How many randoms should be generated. Automatically chosen if this argument is omitted.\n       --crc32                  If this flag is set, 4 bytes of CRC32 checksum will be appended to every random value.\n                                If you need to check the integrity of the data.\n    -d,--debug                  Prints additional info for debugging.\n    -e,--encoding \u003cstring\u003e      Output byte-to-text encoding. Available encodings include:\n                                binary, octal, dec, base16, BASE16, base26, base32, base36, base58, base64, base64-url,\n                                base85, c, c#, java, go, kotlin, node, js, perl, php, python3, ruby, rust, swift, img,\n                                raw, utf8\n    -f,--file \u003cpath\u003e            Prints the random data to given file instead of the command line. Will create the file\n                                if it does not exist or append the data if it does.\n    -h,--help                   Shows this page.\n    -o,--offline                Skips request to external random generators (random.org) for seeding (use when\n                                offline).\n    -p,--padding                If this flag is set, byte-to-text output will be padded to full byte if needed.\n    -r,--robot                  If this flag is set, output will be more friendly for scripting (ie. no verbose text,\n                                only the randoms 1 per line)\n    -s,--seed \u003cstring|number\u003e   Uses either the 64-bit integer interpretation or the utf-8 byte representation of given\n                                parameter to seed the internal random generator. Warns if entropy is low.\n    -u,--urlencode              Uses 'www-form-urlencoded' encoding scheme, also misleadingly known as URL encoding, on\n                                the output strings\n    -v,--version                Prints application version.\n\n\n## Supported Encodings\n\n### Byte-to-Text Encodings\n\n| Name       | Example                                                          | Efficiency | Padding | Description                                                                                                                                                                                                  |\n|------------|------------------------------------------------------------------|-----------:|:-------:|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| binary     | `11101101 10101111 00011110 11111111 11111101 10010100 01001010` |     12.5 % |  false  | A simple binary representation with '0' and '1' divided into 8 bit groups.                                                                                                                                   |\n| octal      | `1124517677707527755`                                            |     37.5 % |  true   | The octal numeral system, is the base-8 number system, and uses the digits 0 to 7.                                                                                                                           |\n| dec        | `20992966904426477`                                              |     41.5 % |  true   | Decimal positive sign-magnitude representation representation in big-endian byte-order.                                                                                                                      |\n| base16     | `4a94fdff1eafed`                                                 |     50.0 % |  false  | Base16 or hex stores each byte as a pair of hexadecimal digits. Lowercase (a-f) letters are used for digits greater than 9.                                                                                  |\n| BASE16     | `4A94FDFF1EAFED`                                                 |     50.0 % |  false  | Base16 or hex stores each byte as a pair of hexadecimal digits. Uppercase (A-F) letters are used for digits greater than 9.                                                                                  |\n| base26     | `FSSLZZFNQZQZ`                                                   |     58.8 % |  true   | Base26 uses the twenty-six letters A-Z.                                                                                                                                                                      |\n| base32     | `JKKP37Y6V7WQ`                                                   |     62.5 % |  true   | Base32 uses a 32-character subset of the twenty-six letters A-Z and the digits 2-7. Uses the alphabet defined in RFC 4648.                                                                                   |\n| base36     | `5qpdvuwjvu5`                                                    |     64.6 % |  true   | Base36 translating into a radix-36 (aka Hexatrigesimal) representation.                                                                                                                                      |\n| base58     | `3pvkeHJmHN`                                                     |     73.2 % |  true   | Base58 is similar to Base64 but has been modified to avoid both non-alphanumeric characters and letters which might look ambiguous when printed. This version uses the alphabet common for Bitcoin protocol. |\n| base64     | `SpT9/x6v7Q`                                                     |     75.0 % |  true   | Base64 represent binary data in an ASCII string format by translating it into a radix-64 representation.                                                                                                     |\n| base64-url | `SpT9_x6v7Q`                                                     |     75.0 % |  true   | Base64 represent binary data in an ASCII string format by translating it into a radix-64 representation. Uses url safe mode                                                                                  |\n| base85     | `8sK;S*j=r`                                                      |     80.1 % |  true   | Base85 uses an 85 character ASCII alphabet to encode. It's main use is with the PDF format and GIT.                                                                                                          |\n\n### Programming Languages\n\n|    Name    | Example                                                             |\n|:----------:|---------------------------------------------------------------------|\n|     c      | `{0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11};`                             |\n|     c#     | `new byte[]{0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11};`                   |\n|    java    | `new byte[]{(byte) 0xD0, 0x3A, 0x4A, (byte) 0xEE, 0x64, 0x11};`     |\n|     go     | `[...]byte = {0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11}`                  |\n|   kotlin   | `byteArrayOf(0xD0.toByte(), 0x3A, 0x4A, 0xEE.toByte(), 0x64, 0x11)` |\n|    node    | `new Buffer([0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11]);`                 |\n| javascript | `Uint8Array.from([0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11]);`            |\n|    perl    | `pack 0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11;`                          |\n|    php     | `array(208, 58, 74, 238, 100, 17);`                                 |\n|  python3   | `bytes([0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11])`                       |\n|    ruby    | `[0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11]`                              |\n|    rust    | `[u8; 6] = [0xd0, 0x3a, 0x4a, 0xee, 0x64, 0x11];`                   |\n|   swift    | `[UInt8] = [0xD0, 0x3A, 0x4A, 0xEE, 0x64, 0x11]`                    |\n\n### Other\n\n| Name | Example   | Description                                                                                                          |\n|------|-----------|----------------------------------------------------------------------------------------------------------------------|\n| raw  | `Jýÿ\u001e¯í` | Prints the raw byte array encoded in ISO_8859_1 which does not change the byte output. Most useful with file output. |\n| utf8 | `J���\u001e��` | Prints the byte array interpreted as UTF-8 encoded text. Only for testing purpose.                                   |\n| img  | `▙▝▚░▓▃`  | Prints a byte per character encoded in unicode block elements.                                                       |\n\n\n## Digital Signatures\n\n### Signed Jar\n\nThe provided JARs in the GitHub release page are signed with my private key:\n\n    CN=Patrick Favre-Bulle, OU=Private, O=PF Github Open Source, L=Vienna, ST=Vienna, C=AT\n    Validity: Thu Sep 07 16:40:57 SGT 2017 to: Fri Feb 10 16:40:57 SGT 2034\n    SHA1: 06:DE:F2:C5:F7:BC:0C:11:ED:35:E2:0F:B1:9F:78:99:0F:BE:43:C4\n    SHA256: 2B:65:33:B0:1C:0D:2A:69:4E:2D:53:8F:29:D5:6C:D6:87:AF:06:42:1F:1A:EE:B3:3C:E0:6D:0B:65:A1:AA:88\n\nUse the jarsigner tool (found in your `$JAVA_HOME/bin` folder) folder to verify.\n\n### Signed Commits\n\nAll tags and commits by me are signed with git with my private key:\n\n    GPG key ID: 4FDF85343912A3AB\n    Fingerprint: 2FB392FB05158589B767960C4FDF85343912A3AB\n\n## Deterministic Random Bit Generation\n\nAs [cryptographically secure pseudorandom number generator](https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator), the [NIST SP800-90Ar1](http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf) recommendation `HMAC-DRBG` is used in an implementation derived from the [google/rappor](https://github.com/google/rappor) project. HMAC-DRBG seems to be a [better choice than the also recommended HASH-DRBG approach](https://crypto.stackexchange.com/questions/1393/is-hmac-drbg-or-hash-drbg-stronger). [Java 9](http://openjdk.java.net/jeps/273) is expected to have its own provider for it. There [is no known issue with Java's current SHA1-PRNG](https://security.stackexchange.com/questions/47871/how-securely-random-is-oracles-java-security-securerandom) implementation, but it is less studied thant the NIST recommendation.\n\nThis implementation uses HMAC-SHA512 internally and reseeds itself after\n1 MiB of random data generation which is well below the maximum NIST\nrecommendation.\n\n_References:_\n\n* [Bruce Schneider: Proof that HMAC-DRBG has No Back Doors](https://www.schneier.com/blog/archives/2017/08/proof_that_hmac.html)\n* [Formal Verification of the HMAC-DRBG Pseudo Random Number Generator](https://www.cs.cmu.edu/~kqy/resources/thesis.pdf)\n* [Security Analysis of DRBG Using HMAC in NIST SP800-90Ar1](http://repo.flib.u-fukui.ac.jp/dspace/bitstream/10098/2126/1/art.pdf)\n\n### Output Test Results\n\nThis PRNG was tested with Robert G. Brown's [dieharder](http://webhome.phy.duke.edu/~rgb/General/dieharder.php) test suite for random number generators, which among others, includes the [ NIST Statistical Test Suite](http://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-22r1a.pdf).\n\nThe reports can be seen in `/misc/reports/*` in this repo.\n\n\n### DRBG Seeding \u0026 Input Sources\n\nA DRGB needs to be seeded by strong entropy sources, so it can safely\nbe expanded to create unpredictable pseudo random output. SP800-90Ar1 defines\ndifferent types of input for the DRGB. This implementation uses the following\ntypes:\n\n#### Entropy Input\n\nThis implementation uses multiple entropy sources to seed its random\nbit generator. All these sources are combined and a weak source will not\nweaken the overall output. This ensures that even if one source fails\nthe output is still cryptographically strong. Below is a detailed\ndescription of the used sources:\n\n##### Strong Secure Random Seed\n\nThis is the main entropy source. This implementation uses the `SecureRandom` class with\nits `getStrongInstance()` constructor to get [the best cryptographic random generator available](https://www.synopsys.com/blogs/software-security/proper-use-of-javas-securerandom/). Internally `SecureRandom` chooses among [providers available at runtime](https://docs.oracle.com/javase/8/docs/technotes/guides/security/SunProviders.html#SecureRandomImp). The best of those access the OS own entropy pools (e.g. `/dev/random` in *nix systems) since the OS has better access to various random sources.\n\n_Further reading:_\n\n* [The Right Way to use Secure Random](https://tersesystems.com/2015/12/17/the-right-way-to-use-securerandom/)\n* [Discussion on seeding random generators](https://crypto.stackexchange.com/questions/51218/practical-way-to-generate-random-numbers-from-prng-which-are-indistinguishable-f)\n\n##### External Random Service Seeding\n\nPer default the tool tries to fetch a seed from an external (supposedly true) random source.\n\nBecause there are various opinions what technique delivers truly random data, this tool\nincorporates 3 different services backed by different hardware RNG. Also, to mitigate the fact\nthat if one or more source is either compromised or produces predictable outcome, the other source\nwill mitigate that flaw.\n\nUsing an external random might open a new attack vector if, for example,\nan attacker might read the seed send over the network. There are 2\nmeasures against this:\n\n* The connections are encrypted with TLS (i.e. HTTPS) and the random\nis signed by the creator which will be verified by a local pinned certificate (only random.org).\n* The seed is only a part of the entropy source and the knowledge of it does not\nmake it possible to guess the random bits. Therefore, there is no sole trust in\nan external service. Every generation of random data will see seeding from both\nlocal and external sources.\n\n[HMAC-based key derivation function (HKDF)](https://en.wikipedia.org/wiki/HKDF)\n described in [RFC5869](https://tools.ietf.org/html/rfc5869) is used to expand the external seed to the desired length.\n\n###### Random.org\n\n[Random.org](https://www.random.org/) is a website that produces \"true random numbers\" based on atmospheric noise captured by several radios tuned between stations. The service has existed since 1998 and was built by [Dr. Mads Haahr](https://www.scss.tcd.ie/Mads.Haahr/) of the [School of Computer Science and Statistics at Trinity College](https://www.scss.tcd.ie/), Dublin in Ireland.\nRandom.org offers [Transport Layer Security (TLS)](https://en.wikipedia.org/wiki/Transport_Layer_Security) encrypted access and signed random data with [JSON-RPC 2.0](http://www.jsonrpc.org/specification)\n\n_References:_\n* [Statistical Analysis](https://www.random.org/analysis/)\n* [Wikipedia Link](https://en.wikipedia.org/wiki/Random.org)\n\n###### Hotbits\n\n[Hotbits](https://www.fourmilab.ch/hotbits/retired.html) is not supported anymore since 1st of Jan 2023 and was removed in dice version 1.8.0.\n\n###### ANU Quantum Random Numbers Server\n\nA quantum random number generator [offered by the Australian National University](https://qrng.anu.edu.au/).\nThe random numbers are generated in real-time by measuring the quantum fluctuations of the vacuum. The services provide\na TLS encrypted JSON/REST API.\n\n_References:_\n* [Statistical Analysis](http://qrng.anu.edu.au)\n* [Random Generator Paper](http://aip.scitation.org/doi/10.1063/1.3597793)\n\n##### Local seeding\n\nThe caller may provide a string that additionally seeds the random bit generator. A seed provided by the user is seen as weak seed and will always\nbe combined with the internal state of a strong `SecureRandom` instance.\n\n##### Threaded Seed Generator\n\nA port of SUN's threaded [seed generator](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/security/provider/SeedGenerator.java) by [Joshua Bloch](https://en.wikipedia.org/wiki/Joshua_Bloch). The seed is produced by counting the number of times the VM manages to loop in a given period. This number roughly reflects the machine load at that point in time. The samples are translated using a permutation (s-box) and then XORed together. This process is non-linear and should prevent the samples from \"averaging out\". This implementation uses faster timings to produce values faster.\n\nThis generator is mainly used as a fallback if there is no external seed and the internal seeds fail.\n\n### Nonce Input\n\nThe nonce is composed of:\n\n* Monotonically increasing sequence number with a starting value of current JVM startup time\n* System nanosecond time (which has arbitrary starting point)\n* JVM uptime in milliseconds\n* Current elapsed milliseconds since January 1, 1970, UTC.\n\nThe four 8 byte values will be hashed with HKDF.\n\n### Personalization String\n\nThe goal of a personalization string is to gather as much information about\ne.g. runtime, machine identifiers and static identifiers to make the call as\nunique as possible for this particular machine/runtime/version/etc.\n\nFor this the following data will be gathered:\n\n* MAC address of all network adapters\n* Runtime \u0026 OS information (e.g. uptime, current cpu usage, processor count, classpath)\n* SCM information (e.g. commit hash, committer, etc.) \u0026 version name\n* Environmental variables and system properties\n* Content of the temp directory\n\nThe resulting data will be hashed with HKDF.\n\n## Example Data\n\nUnder `misc/example` a couple of files of example random data can be found (e.g. 1MiB and 10MiB)\n\n## Build\n\n### Jar Sign\n\nIf you want to jar sign you need to provide a file `keystore.jks` in the\nroot folder with the correct credentials set in environment variables (\n`OPENSOURCE_PROJECTS_KS_PW` and `OPENSOURCE_PROJECTS_KEY_PW`); alias is\nset as `pfopensource`.\n\nIf you want to skip jar signing just change the skip configuration in the\n`pom.xml` jar sign plugin to true:\n\n    \u003cskip\u003etrue\u003c/skip\u003e\n\n### Build with Maven\n\nUse maven (3.1+) to create a jar including all dependencies\n\n    mvn clean install\n\n### Checkstyle Config File\n\nThis project uses my [`common-parent`](https://github.com/patrickfav/mvn-common-parent) which centralized a lot of\nthe plugin versions as well as providing the checkstyle config rules. Specifically they are maintained in [`checkstyle-config`](https://github.com/patrickfav/checkstyle-config). Locally the files will be copied after you `mvnw install` into your `target` folder and is called\n`target/checkstyle-checker.xml`. So if you use a plugin for your IDE, use this file as your local configuration.\n\n## Tech-Stack\n\n* Java 8\n* Maven\n* rxjava2, apache-commons-codec, apache-commons-cli, Retrofit 2\n* Proguard, Launch4j, Jar Signing\n\n# Credits\n\n* HMAC_DRBG implementation derived from [google/rappor](https://github.com/google/rappor)\n* Icon based on cube icon made by [Smashicons](https://www.flaticon.com/authors/smashicons)\n\n# License\n\nCopyright 2017 Patrick Favre-Bulle\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickfav%2Fdice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickfav%2Fdice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickfav%2Fdice/lists"}