Compare commits
2 Commits
3ebb5a08ec
...
c6189e7b10
Author | SHA1 | Date | |
---|---|---|---|
c6189e7b10 | |||
b7e69df12c |
40
docs/functions/core/decrypter/why2_decrypt_text.md
Normal file
40
docs/functions/core/decrypter/why2_decrypt_text.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<!--
|
||||||
|
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).
|
40
docs/functions/core/encrypter/why2_encrypt_text.md
Normal file
40
docs/functions/core/encrypter/why2_encrypt_text.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<!--
|
||||||
|
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).
|
@ -22,15 +22,27 @@ You can find documentation for every *public* function of WHY2 below.
|
|||||||
|
|
||||||
## Core
|
## Core
|
||||||
|
|
||||||
### Crypto.h
|
### Crypto
|
||||||
|
|
||||||
| Function | Description |
|
| Function | Description |
|
||||||
| ------------------------------------------------------- | ------------------------------------------------ |
|
| ---------------------------------------------------- | ------------------------------------------------ |
|
||||||
| [`why2_sum_segment`](./core/crypto/why2_sum_segment) | Calculate SUM++ for input; Used for padding seed |
|
| [`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_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_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 |
|
| [`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
|
## Logger
|
||||||
|
|
||||||
## Chat
|
## Chat
|
Loading…
x
Reference in New Issue
Block a user