1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-26 16:52:25 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Máté Kocsis
5e2031dc70 Update ext/random role attributes (#2058) 2022-12-11 22:40:19 +01:00
Tim Düsterhus
466f58e332 Extend ext/random documentation (3) (#1951)
* random: Remove redundant “Returns” prefix from return value explanation

* random: Document Engine::generate()'s return value

* random: Document Xoshiro256StarStar::generate()'s return value

* random: Document PcgOneseq128XslRr64::generate()'s return value

* random: Document Mt19937::generate()'s return value

* random: Document Secure::generate()'s return value

* random: Document the Randomizer::$engine property

* random: Clarify the int seeding for PcgOneseq128XslRr64

This change is relevant for negative seed values.

* random: Document Mt19937::__construct()'s parameter value

* random: Add description for CryptoSafeEngine

* random: Add description for RandomError

* random: Add description for RandomException

* random: Improve phrasing for MT_RAND_PHP for Mt19937

Co-authored-by: George Peter Banyard <girgias@php.net>

* random: Explain the `$mode` parameter for Mt19937 construction with a list

Co-authored-by: George Peter Banyard <girgias@php.net>
2022-11-08 17:42:23 +01:00
Máté Kocsis
d6aee4a500 Sync a few manual pages with the stubs (#1936) 2022-11-04 13:30:04 +01:00
Tim Düsterhus
4b1b9be99e Extend ext/random documentation (#1920)
* random: Fix Randomizer::__construct()'s default value

The parameter is nullable and the actual default value should rather be
considered `null`. `null` is then *internally* replaced with a new instance of
`Random\Engine\Secure`.

* random: Document Randomizer::__construct()'s parameters

* random: Document Randomizer::getBytes()' parameter and return value

The phrasing is adapted from and synced with `random_bytes()`.

* random: Fix classname references for CSPRNG failures

* random: Unify phrasing random_int parameter description

* random: Document Randomizer::getInt()'s parameter and return value

The phrasing is adapted from and synced with `random_int()`.

* random: Add random.engineErrors snippets

This explains that the Randomizer's methods will pass through any Throwables
thrown by the engine.

* random: Fix definition of Randomizer::$engine

* random: Improve random_int/getInt parameter descriptions

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

* random: Improve random_int return value description

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

* random: Fix link to Randomizer::$engine property

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

* random: Use `&null;` entity in Randomizer::__construct()

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-10-30 14:58:54 +01:00
Tim Düsterhus
2166824858 Bootstrap ext/random docs with docgen
Closes GH-1916.
2022-10-28 15:21:01 +02:00