Giter Site home page Giter Site logo

birand / nova_drop Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3 KB

nova_drop is a lightweight, easy-to-use pseudo-random number generator (PRNG) designed for applications requiring random number generation with a good balance between simplicity, efficiency, and randomness quality. It features an increased state size and complex state interactions to enhance the randomness of its output.

License: MIT License

C 100.00%
c99 prng randomizer

nova_drop's Introduction

Nova Drop Pseudo-Random Number Generator

Overview

nova_drop is a lightweight, easy-to-use pseudo-random number generator (PRNG) designed for applications requiring random number generation with a good balance between simplicity, efficiency, and randomness quality. It features an increased state size and complex state interactions to enhance the randomness of its output.

Features

  • Increased state size for longer periods and improved randomness.
  • Complex bitwise operations ensure thorough mixing of state.
  • Easy to integrate into any C or C++ project.
  • Designed with simplicity and performance in mind.

Getting Started

Prerequisites

  • A C compiler (e.g., GCC, Clang)
  • Basic knowledge of C programming

Compilation

  1. Save nova_drop.c and nova_drop.h in your project directory.
  2. Include nova_drop.h in your source file: #include "nova_drop.h".
  3. Compile your project. For example, if using GCC and your source file is main.c:
gcc -o my_program main.c nova_drop.c

Usage

Initialize the PRNG State: Before generating random numbers, initialize the state with a seed.

uint32_t state[NOVA_DROP_STATE_SIZE];
uint32_t seed = 123456789; // Example seed
nova_init(state, seed);

Generate Random Numbers: Use nova_drop to generate random numbers as needed.

uint32_t random_number = nova_drop(state);

Documentation

Functions

void nova_init(uint32_t *state, uint32_t seed): Initializes the PRNG state with a given seed. uint32_t nova_drop(uint32_t *state): Generates a pseudo-random number based on the current state and updates the state.

Constants

NOVA_DROP_STATE_SIZE: The size of the state array required by nova_drop. Currently set to 5.

License

nova_drop is open source and freely available for personal and commercial use.

Disclaimer

While nova_drop has been designed with care, it has not undergone extensive testing in cryptographic contexts and should not be used for security-critical applications without further validation.

Contributions

Contributions, suggestions, and bug reports are welcome and can be submitted via the project's GitHub repository.

Contact

For questions or support, please open an issue on the GitHub project page.

nova_drop's People

Contributors

birand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.