Download the PHP package rych/random without Composer

On this page you can find all versions of the php package rych/random. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package random

Rych Random Data Library

Latest Version on Packagist Build Status Coverage Status Quality Score Total Downloads

This library aims to provide a clean interface to generating cryptographically secure random data in PHP 5.3+.

Install

Via Composer

Usage

The library is easy to get up and running quickly. The best source of random data available for your platform will be automatically selected and configured.

If you prefer your random bytes delivered in hex format, we can do that too:

Generators

The library provides support for several CSPRNGs. The generator factory class Rych\Random\Generator\GeneratorFactory can be used to automatically discover and select the best available option for the current platform.

MCrypt (Rych\Random\Generator\MCryptGenerator)

MCrypt provides an interface to standard operating system CSPRNGs through the mcrypt_create_iv() function. On Windows systems, this function will use the Windows CryptoAPI, while other operating systems will read from /dev/urandom. This backend requires PHP's MCrypt extension to be enabled.

This is the preferred backend, and will be selected by default if it is available.

OpenSSL (Rych\Random\Generator\OpenSSLGenerator)

OpenSSL provides a CSPRNG through the openssl_random_pseudo_bytes() function. Support for this backend requires that PHP's OpenSSL extension be available. Windows servers also have the requirement of running PHP versions >= 5.3.7 due to a bug in the PHP OpenSSL implementation which could cause the function to perform slowly or even hang.

The OpenSSL backend is the second preferred backend, and will be selected if it is available.

CAPICOM (Rych\Random\Generator\CapicomGenerator)

Although Microsoft has deprecated the CAPICOM interface, the library currently supports the old interface. Support requires running on a Windows server with the COM extension enabled.

It should be noted that the MCrypt backend, if available, will use the newer Windows CryptoAPI to access Windows' built-in CSPRNG. The OpenSSL backend will do the same on PHP versions >= 5.4.0.

As CAPICOM is deprecated, it will only be selected if neither the MCrypt or OpenSSL backends are available on Windows systems.

/dev/urandom (Rych\Random\Generator\URandomGenerator)

The built-in non-blocking CSPRNG on most non-Windows platforms is supported by this backend. Support requires read-access to /dev/urandom on non-Windows platforms.

This backend will only be selected if neither the MCrypt or OpenSSL backends are available on non-Windows systems.

George Argyros' clock drift algorithm (Rych\Random\Generator\ClockDriftGenerator)

Systems which cannot use any of the above backends will use this one. It provides a CSPRNG in pure PHP, although it is pretty slow.

This backend has no special requirements, and is therefore always available.

Testing

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.


All versions of random with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rych/random contains the following files

Loading the files please wait ....