Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
|
The file containing all the logic for encryption. More...
#include <memory>
#include <string>
#include <cstddef>
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <zlib.h>
Go to the source code of this file.
Classes | |
class | crypto::MinecraftHash |
The Minecraft Hashing class. More... | |
class | crypto::AES128CFB8Cipher |
AES/CFB8 128bit cipher class. More... | |
class | crypto::ZLibCompressor |
ZLib compressor. More... | |
Namespaces | |
namespace | crypto |
The crypto namespace. | |
Enumerations | |
enum | crypto::CipherState { crypto::DECRYPT , crypto::ENCRYPT } |
Possible cipher states. More... | |
Functions | |
bool | crypto::init () |
Inits Crypto. | |
void | crypto::cleanup () |
Cleanups Crypto. | |
std::unique_ptr< std::byte[]> | crypto::rsaEncrypt (const std::byte *data, size_t len, size_t *outLen) |
Encrypts data using the server's RSA keypair. | |
std::unique_ptr< std::byte[]> | crypto::rsaDecrypt (const std::byte *data, size_t len, size_t *outLen) |
Decrypts data using the server's RSA keypair. | |
std::unique_ptr< std::byte[]> | crypto::getPublicRSAKey (int *outLen) |
Get the Public RSA Public Key. | |
std::unique_ptr< std::byte[]> | crypto::randomSecure (size_t len) |
Generates randoms bytes securely. | |
std::string | crypto::md5Digest (const std::string &data) |
MD5 digests a string. | |
Variables | |
constexpr int | crypto::RSA_KEY_LENGTH = 1024 |
The length of the rsa keys. | |
The file containing all the logic for encryption.