Truly Random Number Generator
Project description
TRNGen: Truly Random Number Generator
TRNGen is a Python package that provides a secure and unpredictable random number generator by incorporating external entropy factors such as audio, disk and network I/O readings, events, display, mouse coordinates, and timer. These factors are combined using XOR, hashing algorithms, and linearity deviation to produce truly random values that avoid algorithmic prediction.
Content:
Features
- External Factors: Utilizes various external entropy factors to enable true randomness.
Audio
: Captures audio data.Disk
I/O Readings: Includes disk I/O readings.Network
I/O Readings: Incorporates network I/O readings for added entropy.Display
: Utilizes random display information for increased unpredictability.Mouse Coordinates
: Captures mouse coordinates.Timer
: Includes timer values in the randomization process.
- Secure: Employs cryptographic techniques on top of above values to ensure unpredictability.
XOR
functionHashing
algorithmsLinearity Deviation
method
- Easy Integration: Simple Python package use for easy integration into your projects.
Requirements
Python >= 3.7
- Download the installer, run it and follow the steps.
- Make sure to check the box that says
Add Python to PATH
during installation. - Reboot computer.
Installation
You can install TRNGen using pip
:
pip install TRNGen
How to use
-
Import
from trngen import TRNGen
-
Create an instance of the TRNGen generator
generator = TRNGen()
-
Available parameters:
- Check here on TRNGen() parameters
-
Available functions:
-
trngen()
- Main function that generates and returns the random integer hash value
-
hash(algorithm='sha3_256')
- Returns random cryptographic hash
-
percentage(simple=False)
- Returns random percentage in decimal form
-
integer(start, end)
- Returns random integer in range from start to end
-
float(start, end)
- Returns random float in range from start to end
-
alphanumeric(length=any)
- Returns random alphanumeric value, default of letters, digits and symbols
-
choice(seq)
- Randomly chooses a element from an iterable sequence
-
shuffle(seq, in_place=True)
- Randomly shuffles an iterable
-
sample(seq, sample_size)
- Randomly samples a specified number of elements from an iterable
-
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have questions, feel free to open an issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file TRNGen-0.0.2.tar.gz
.
File metadata
- Download URL: TRNGen-0.0.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb4e0b21eae1878286b02fd18560c294158a4d5fd33ef8c4a5c0e5068848651a |
|
MD5 | 3975c58101a1750c593bfda2fe12cf3e |
|
BLAKE2b-256 | 6e46c1343760d81652e58f15978cf7eba82aecb1ba7a18b54bc7c2321dfe3a66 |
File details
Details for the file TRNGen-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: TRNGen-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6e5aa8232c84fdf5a70964117f820a542e72bb62bc6d6cc35ea7e47e8535838 |
|
MD5 | 9c01f12c249261a3f19b1a1f1ffa5092 |
|
BLAKE2b-256 | 9938bade8ea67ce54838bc4aff5d99a46487a0ecd81a3c8db2d9625445a04f65 |