https://github.com/nir3x/fxms.cpp
FNV-XOR-Mask-Shuffle Symmetric Encryption Algorithm
https://github.com/nir3x/fxms.cpp
algorithm c-plus-plus cpp crypto encryption fnv fxms mask security shuffle symmetric xor
Last synced: 3 months ago
JSON representation
FNV-XOR-Mask-Shuffle Symmetric Encryption Algorithm
- Host: GitHub
- URL: https://github.com/nir3x/fxms.cpp
- Owner: NIR3X
- License: agpl-3.0
- Created: 2024-01-10T18:35:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T04:03:28.000Z (over 1 year ago)
- Last Synced: 2024-02-16T05:22:51.239Z (over 1 year ago)
- Topics: algorithm, c-plus-plus, cpp, crypto, encryption, fnv, fxms, mask, security, shuffle, symmetric, xor
- Language: C++
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FNV-XOR-Mask-Shuffle Symmetric Encryption Algorithm
This is a C++ package that implements the FNV-XOR-Mask-Shuffle symmetric encryption algorithm. This algorithm is a combination of several cryptographic techniques that make it difficult for an attacker to decrypt the data.
## Installation
To use this package, you can clone the repository and compile it using a C++ compiler:
```bash
git clone https://github.com/NIR3X/Fxms.cpp
cd Fxms.cpp
make
```## Usage
Here is an example of how to use this package:
```cpp
#include "Fxms.h"
#include
#include
#includeint main() {
// Generate a random key
auto key = CFxms::GenKey();// Data to encrypt
std::vector data = {'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', '!'};// Encrypt the data
std::vector encrypted = {};
CFxms::Status status = CFxms::Encrypt(key, data, encrypted, CFxms::Mode::OptimizeEncryption);
if (status != CFxms::Status::Success) {
std::cout << "Encryption failed" << std::endl;
return 1;
}// Decrypt the data
std::vector decrypted = {};
status = CFxms::Decrypt(key, encrypted, decrypted, CFxms::Mode::OptimizeEncryption);
if (status != CFxms::Status::Success) {
std::cout << "Decryption failed" << std::endl;
return 1;
}// Print the decrypted data
std::cout << std::string(decrypted.begin(), decrypted.end()) << std::endl;
return 0;
}
```## License
[](https://www.gnu.org/licenses/agpl-3.0.html)
This program is Free Software: You can use, study share and improve it at your
will. Specifically you can redistribute and/or modify it under the terms of the
[GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) as
published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.