created doc for why2_seed_random

This commit is contained in:
Václav Šmejkal 2025-01-25 15:23:27 +01:00
parent 3bd0c693df
commit 65c1c571a9
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,37 @@
<!--
This is part of WHY2
Copyright (C) 2022 Václav Šmejkal
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
# why2_seed_random
## Parameters
| Identifier | Data type |
| ---------- | ---------------- |
| `seed` | `unsigned long` |
## Attributes
| | |
| ------------------ | -------------------------------- |
| **Return type** | `void` |
| **Header comment** | `SEED why2_seeded_random OUTPUT` |
| **Added in commit** | [`25113dc0b3c97178c85ac02c082164a6d36d3c1e`](https://github.com/ENGO150/WHY2/commit/25113dc0b3c97178c85ac02c082164a6d36d3c1e) |
## Description
Function inits pseudo random number generator `struct` with `seed`. Seeded numbers can be used with [`why2_seeded_random`](../why2_seeded_random). Also, there is no need to deallocate the PRNG.

View File

@ -28,6 +28,7 @@ You can find documentation for every *public* function of WHY2 below.
| ------------------------------------------------------- | ------------------------------------------------ |
| [`why2_sum_segment`](./core/crypto/why2_sum_segment.md) | Calculate SUM++ for input; Used for padding seed |
| [`why2_random`](./core/crypto/why2_random.md) | Write crypto-secure random number into dest |
| [`why2_seed_random`](./core/crypto/why2_seed_random.md) | Seed why2_seeded_random output |
## Logger