Compare commits

..

No commits in common. "c6189e7b106321482eb92b5bcc0ba87b099f2e74" and "3ebb5a08ecf982c10a18c0596be4bb2549a815c9" have entirely different histories.

3 changed files with 3 additions and 95 deletions

View File

@ -1,40 +0,0 @@
<!--
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_decrypt_text
## Parameters
| Identifier | Data type |
| ---------- | --------- |
| `text` | `char *` |
| `key` | `char *` |
## Attributes
| | |
| ------------------ | --------------------------------------------------------------------- |
| **Return type** | [`why2_output_flags`](../../../../types/core/flags/why2_output_flags) |
| **Header comment** | `TEXT from WILL BE DECRYPTED WITH KEY AND RETURNED` |
| **Added in commit** | [`d9a99b985105b99b3ef237597f8ea91a751b89f1`](https://github.com/ENGO150/WHY2/commit/d9a99b985105b99b3ef237597f8ea91a751b89f1) |
## Description
Function removes padding (if present) from `text` using `key`, decrypts and returns output in [`why2_output_flags`](../../../../types/core/flags/why2_output_flags) among with some run data.
Encryption/Decryption functions are using settings from [`why2_input_flags`](../../../../types/core/flags/why2_input_flags). You can set those using [`why2_set_flags`](../../../../functions/core/flags/why2_set_flags).

View File

@ -1,40 +0,0 @@
<!--
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_encrypt_text
## Parameters
| Identifier | Data type |
| ---------- | --------- |
| `text` | `char *` |
| `key` | `char *` |
## Attributes
| | |
| ------------------ | --------------------------------------------------------------------- |
| **Return type** | [`why2_output_flags`](../../../../types/core/flags/why2_output_flags) |
| **Header comment** | `TEXT from WILL BE ENCRYPTED WITH key AND RETURNED` |
| **Added in commit** | [`d9a99b985105b99b3ef237597f8ea91a751b89f1`](https://github.com/ENGO150/WHY2/commit/d9a99b985105b99b3ef237597f8ea91a751b89f1) |
## Description
Function adds padding (if enabled) to `text` using `key`, encrypts and returns output in [`why2_output_flags`](../../../../types/core/flags/why2_output_flags) among with some run data.
Encryption/Decryption functions are using settings from [`why2_input_flags`](../../../../types/core/flags/why2_input_flags). You can set those using [`why2_set_flags`](../../../../functions/core/flags/why2_set_flags).

View File

@ -22,27 +22,15 @@ You can find documentation for every *public* function of WHY2 below.
## Core
### Crypto
### Crypto.h
| Function | Description |
| ---------------------------------------------------- | ------------------------------------------------ |
| ------------------------------------------------------- | ------------------------------------------------ |
| [`why2_sum_segment`](./core/crypto/why2_sum_segment) | Calculate SUM++ for input; Used for padding seed |
| [`why2_random`](./core/crypto/why2_random) | Write crypto-secure random number into dest |
| [`why2_seed_random`](./core/crypto/why2_seed_random) | Seed why2_seeded_random output |
| [`why2_seeded_random`](./core/crypto/why2_seeded_random) | GENERATE RANDOM NUMBER BASED ON SEED PASSED IN why2_seed_random |
### Decrypter
| Function | Description |
| --------------------------------------------------------- | ------------------------------------------------- |
| [`why2_decrypt_text`](./core/decrypter/why2_decrypt_text) | Text from will be decrypted with key and returned |
### Encrypter
| Function | Description |
| --------------------------------------------------------- | ------------------------------------------------- |
| [`why2_encrypt_text`](./core/encrypter/why2_encrypt_text) | Text from will be encrypted with key and returned |
## Logger
## Chat