2022-03-20 18:12:25 +01:00
# WHY2 Encryption System
*Yeah.*
### Table of contents
2022-05-01 16:25:10 +02:00
- [Installation ](#installation )
2022-03-20 18:12:25 +01:00
- [Using in Your projects ](#using-in-your-projects )
- [Example of code ](#example-of-code )
- [Example programs ](#example-programs )
2022-03-21 19:29:30 +01:00
- WHY2 in another languages
- [JavaScript ](#javascript )
2022-03-20 18:12:25 +01:00
2022-05-01 16:25:10 +02:00
## Installation
Run 'build.sh install' with root permissions to install WHY2 on your system.
`sudo ./build.sh install`
2022-03-20 18:12:25 +01:00
## Using in Your projects
2022-04-06 18:57:02 +02:00
Run `configure.sh` and you'll be good to go.
2022-03-20 18:12:25 +01:00
To **encrypt** text, use function `encryptText()` from file `include/encrypter.h` .
To **decrypt** text, use function `decryptText()` from file `include/decrypter.h` .
Jump to [examples ](#examples ) if you're not sure, how to use.
## Example of code
- Encryption:
```c
//FIRST VARIANT
2022-04-29 18:06:01 +02:00
char *yourText = encryptText("Put here text, you want encrypt...", "tzXlZGxkhfYOvRthqokDrmGFyDMylgmeIlrJTpVAwuqrLjABXM");
//The second thing is Your **key** . (The key must be at least 50 characters long!)
2022-03-20 18:12:25 +01:00
//SECOND VARIANT
2022-04-29 18:06:01 +02:00
char *yourText = encryptText("Put here text, you want encrypt...", NULL);
//See? You don't have to use Your key. Program will automatically generate one for you. It will be printed out, so save it somewhere.
2022-03-20 18:12:25 +01:00
```
- Decryption:
```c
2022-04-29 18:06:01 +02:00
char *yourText = decryptText("158.-83.9388.-14.57.8419.113.-98.10576", "tzXlZGxkhfYOvRthqokDrmGFyDMylgmeIlrJTpVAwuqrLjABXM");
//First parameter is Your encrypted text, the second is key you want to use for decryption it.
2022-03-20 18:12:25 +01:00
```
## Example programs
2022-03-24 18:42:14 +01:00
Uhm... There aren't any examples (for now)... We will maybe create some... Later...
2022-03-21 19:29:30 +01:00
## JavaScript
2022-03-24 18:42:14 +01:00
You can found the JS remake [>> RIGHT HERE << ](https://github.com/ENDev-WHY2/WHY2-Encryption-System/tree/js ). Thanks, [@SebestikCZ ](https://github.com/SebestikCZ ) < 3