/Pure_NRNG

Generate multi-precision non-deterministic random Numbers package in python.

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

Pure_NRNG

PyPI PyPI - Status GitHub Release Date Language grade: Python Codacy Badge PyPI - Downloads PyPI - Python Version PyPI - License

Generate multi-precision non-deterministic random Numbers package in python.

According to the calculation of the minimum entropy value of the raw entropy, the adaptive absorption of the appropriate entropy bit.

Installation

Installation can be done through pip. You must have python version >= 3.8

pip install pure-nrng

Usage

The statement to import the package:

from pure_nrng_package import pure_nrng
or
from pure_nrng_package import *

Example:

>>> nrng_instance = pure_nrng()
>>> true_rand_bits = nrng_instance.true_rand_bits(256)
>>> next(true_rand_bits)
>>> true_rand_float = nrng_instance.true_rand_float(256)
>>> next(true_rand_float)
>>> true_rand_int = nrng_instance.true_rand_int(100, 1)
>>> next(true_rand_int)