Giter Site home page Giter Site logo

mygirl8893 / simply-random-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blocktrail/simply-random-php

0.0 0.0 0.0 19 KB

A simple library for generating secure randomness (strings, integers, shuffling) using MCRYPT_DEV_URANDOM

PHP 100.00%

simply-random-php's Introduction

Simply Random

Latest Stable Version Build Status

tested on 5.6, 7.0, 7.1 and HHVM

What is this library?

This is a simple library for random number generation using random_bytes.
This library can generate strong, cryptographically secure random numbers, and other useful random values.

Dependencies

This library depends on random_bytes or the polyfill provided by ParagonIE. If provided as a native extension the kernel CSPRNG is used. The polyfill handles checking for appropriate sources of entropy if this is not available.

Installation

Simply use composer require blocktrail/simply-random ~1.0.

Usage

Please refer to test.php for example usage.

Credits to ircmaxell

Most of the code used in this library was originally written by ircmaxell for random_compat. This library initially began as a fork with reduced complexity, and strong dependency on mcrypt.

see: http://timoh6.github.io/2013/11/05/Secure-random-numbers-for-PHP-developers.html

and more: https://news.ycombinator.com/item?id=6216101 http://security.stackexchange.com/questions/3936/is-a-rand-from-dev-urandom-secure-for-a-login-key/3939#3939

simply-random-php's People

Contributors

rubensayshi avatar ircmaxell avatar afk11 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.