PHPackages                             sunsevennv/xorshift - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sunsevennv/xorshift

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sunsevennv/xorshift
===================

Random number generator (RNG) by Andreas Madsen &amp; Emil Bay

1.0.4(5y ago)232MITJavaScript

Since Mar 30Pushed 5y agoCompare

[ Source](https://github.com/sunsevennv/xorshift)[ Packagist](https://packagist.org/packages/sunsevennv/xorshift)[ Docs](https://www.gamblingtec.com)[ RSS](/packages/sunsevennv-xorshift/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

xorshift [![Build Status](https://camo.githubusercontent.com/33cf2eb7fb73218625021dd57f7574b69eaa73f304760e8f6af9ade757b6aeaa/68747470733a2f2f7472617669732d63692e6f72672f416e64726561734d616473656e2f786f7273686966742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/AndreasMadsen/xorshift)
==========================================================================================================================================================================================================================================================================================================

[](#xorshift-)

> Pseudorandom number generator using [xorshift128+](http://xorshift.di.unimi.it/)

Certified RNG using javascript (for gambling related games)
-----------------------------------------------------------

[](#certified-rng-using-javascript-for-gambling-related-games)

This module was written by Andreas Madsen &amp; Emil Bay and modified by Brendan Nash in order to be certified under a UK, Malta and Curacao Gambling License.

The module is free to use in line with the original authors intentions.

Gambling License &amp; RNG Certification
----------------------------------------

[](#gambling-license--rng-certification)

Should your organisation require an RNG certificate in order to obtain a gambling license, we can provide you with a certificate for this module.

You can place your order here:

- email: brendan \[at\] gamblingTec.com
- WhatsApp: +44 (0)7498 105896
- Skype/Telegram: brendanjnash

Installation
------------

[](#installation)

```
npm install xorshift
```

Example
-------

[](#example)

```
var xorshift = require('xorshift');

for (var i = 0; i  This is the fastest generator passing BigCrush without systematic errors, but due to the relatively short period it is acceptable only for applications with a very mild amount of parallelism; otherwise, use a xorshift1024\* generator. –

This source also has a [reference implementation](http://xorshift.di.unimi.it/xorshift128plus.c)for the xorshift128+ generator. A wrapper around this implementation has been created and is used for testing this module. To compile and run it:

```
gcc -O2 reference.c -o reference
./reference
```

- `` can be any number greater than zero, and it will be the number of random numbers written to `stdout`. The default value is `10`.
- `` and `` forms the 128bit seed that the algorithm uses. Default is `[1, 2]`.

License
-------

[](#license)

**This software is licensed under "MIT"**

> Copyright (c) 2014 Andreas Madsen &amp; Emil Bay
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~158 days

Total

3

Last Release

1916d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/360327405fadc649defd24ca2dd10cc1b7c8675be473707c84cdd0b0794306de?d=identicon)[sunsevennv](/maintainers/sunsevennv)

---

Top Contributors

[![AndreasMadsen](https://avatars.githubusercontent.com/u/505333?v=4)](https://github.com/AndreasMadsen "AndreasMadsen (42 commits)")[![chateaux](https://avatars.githubusercontent.com/u/5870036?v=4)](https://github.com/chateaux "chateaux (19 commits)")[![emilbayes](https://avatars.githubusercontent.com/u/416524?v=4)](https://github.com/emilbayes "emilbayes (11 commits)")[![CharlesWall](https://avatars.githubusercontent.com/u/1440999?v=4)](https://github.com/CharlesWall "CharlesWall (1 commits)")[![LizAinslie](https://avatars.githubusercontent.com/u/45880278?v=4)](https://github.com/LizAinslie "LizAinslie (1 commits)")[![LMLB](https://avatars.githubusercontent.com/u/6322603?v=4)](https://github.com/LMLB "LMLB (1 commits)")

---

Tags

RNGrandom number generatorunityxorshiftgamblingtecgambling rng

### Embed Badge

![Health badge](/badges/sunsevennv-xorshift/health.svg)

```
[![Health](https://phpackages.com/badges/sunsevennv-xorshift/health.svg)](https://phpackages.com/packages/sunsevennv-xorshift)
```

###  Alternatives

[kriswallsmith/assetic

Asset Management for PHP

3.7k48.9M160](/packages/kriswallsmith-assetic)[laracasts/cypress

Laravel Cypress Boilerplate

6273.2M4](/packages/laracasts-cypress)[savvot/random

Deterministic pseudo-random generators library with dozens of useful functions and several sources of randomness

21243.7k5](/packages/savvot-random)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[heyday/silverstripe-menumanager

Allows complex menu management to be handled through the CMS when a simple tree structure is not enough.

36304.4k7](/packages/heyday-silverstripe-menumanager)[nepster-web/gambling-tech

Gambling Algorithms for Certification.

112.0k](/packages/nepster-web-gambling-tech)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
