Skip to main content

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 function
    • Hashing algorithms
    • Linearity 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:

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TRNGen-0.0.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

TRNGen-0.0.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file TRNGen-0.0.1.tar.gz.

File metadata

  • Download URL: TRNGen-0.0.1.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

Hashes for TRNGen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 960858ebb38107c3b5cd32e3bd874655402c24d77ae405d1a3db94acd094c561
MD5 ae169a07b410e059a8e397686277599e
BLAKE2b-256 f2a59d019a66bed05e895913437bbda366d6343cb5bc822fa94845b19d78907f

See more details on using hashes here.

File details

Details for the file TRNGen-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: TRNGen-0.0.1-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

Hashes for TRNGen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37953e86d34ea4271cf448342d11ada5dbd3edadc4c33c900d944d98f97d8dba
MD5 4d4bbbe61150b68265159c9b3fad6a06
BLAKE2b-256 6021fd0382bfb4ebcba94927e009084df9c3381e795c8d61a4f85eb94d6cf12f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page