# Rewrite Rand functions · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/0fd0f6fd1f4b9e02cc33eac304b9f6db242cbb67)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 0fd0f6fd1f4b9e02cc33eac304b9f6db242cbb67

Requested commit: 0fd0f6fd1f4b9e02cc33eac304b9f6db242cbb67

Commit: 0fd0f6fd1f4b9e02cc33eac304b9f6db242cbb67

Tree: dc06675959dce091f7fa58c138d4b567cf2ba87f

Author: Marc Tiehuis

Committer: Marc Tiehuis

## Message

```
Rewrite Rand functions

We now use a generic Rand structure which abstracts the core functions
from the backing engine.

The old Mersenne Twister engine is removed and replaced instead with
three alternatives:

 - Pcg32
 - Xoroshiro128+
 - Isaac64

These should provide sufficient coverage for most purposes, including a
CSPRNG using Isaac64. Consumers of the library that do not care about
the actual engine implementation should use DefaultPrng and DefaultCsprng.

```

## Parents

- [032fccf6151ff201ce4b8c7ab28ca460fed794c0](https://git.cafe/gitcafe/zig/commit/032fccf6151ff201ce4b8c7ab28ca460fed794c0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/0fd0f6fd1f4b9e02cc33eac304b9f6db242cbb67?format=markdown)
