https://github.com/libreworks/caridea-random
:fried_shrimp: Caridea is a miniscule PHP application library. This is a shrimpy random number generation component.
https://github.com/libreworks/caridea-random
Last synced: 10 months ago
JSON representation
:fried_shrimp: Caridea is a miniscule PHP application library. This is a shrimpy random number generation component.
- Host: GitHub
- URL: https://github.com/libreworks/caridea-random
- Owner: libreworks
- License: apache-2.0
- Created: 2015-06-03T15:59:23.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-21T21:48:08.000Z (over 10 years ago)
- Last Synced: 2025-06-10T10:10:23.391Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# caridea-random
Caridea is a miniscule PHP application library. This shrimpy fellow is what you'd use when you just want some helping hands and not a full-blown framework.

This is its random number generation component. It has providers for Mcrypt and OpenSSL. Other random number generation in PHP isn't considered secure enough to have an adapter here.
[](https://travis-ci.org/libreworks/caridea-random)
[](https://scrutinizer-ci.com/g/libreworks/caridea-random/?branch=master)
[](https://scrutinizer-ci.com/g/libreworks/caridea-random/?branch=master)
## Installation
You can install this library using Composer:
```console
$ composer require caridea/random
```
This project requires PHP 5.5 and has no dependencies.
## Compliance
Releases of this library will conform to [Semantic Versioning](http://semver.org).
Our code is intended to comply with [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/), and [PSR-4](http://www.php-fig.org/psr/psr-4/). If you find any issues related to standards compliance, please send a pull request!
## Examples
Just a few quick examples.
```php
if (\Caridea\Random\Mcrypt::isAvailable()) {
$rando = new \Caridea\Random\Mcrypt();
$bytes = $rando->generate(32);
}
if (\Caridea\Random\OpenSsl::isAvailable()) {
$rando = new \Caridea\Random\OpenSsl();
$bytes = $rando->generate(32);
}
```