SweeCrypt ported to C++
- C++ 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| README.md | ||
| sweecrypt.cpp | ||
| sweecrypt.h | ||
SweeCrypt-cpp
A port of SweeCrypt to C++.
Currently, only the library is implemented, though a CLI is coming eventually.
How to use it:
#include <iostream>
#include "sweecrypt.h"
int main(void)
{
std::string msg;
msg = "this is a message encrypted with SweeCrypt-cpp";
msg = SweeCrypt::encrypt(msg, 0);
std::cout << msg << std::endl;
msg = SweeCrypt::decrypt(msg, 0);
std::cout << msg << std::endl;
msg = "this is a message encrypted with SweeCrypt-cpp with a shift of 30";
msg = SweeCrypt::encrypt(msg, 30);
std::cout << msg << std::endl;
msg = SweeCrypt::decrypt(msg, 30);
std::cout << msg << std::endl;
return 0;
}
No build system is used here, simply compile SweeCrypt-cpp in with your program:
$ c++ -o your_program sweecrypt.cpp your_program.cpp