![]() |
Botcraft 1.21.4
|
#include <AESEncrypter.hpp>
Public Member Functions | |
AESEncrypter () | |
~AESEncrypter () | |
void | Init (const std::vector< unsigned char > &pub_key, const std::vector< unsigned char > &input_nonce, std::vector< unsigned char > &raw_shared_secret, std::vector< unsigned char > &encrypted_shared_secret, std::vector< unsigned char > &encrypted_challenge) |
Initialize the encryption context for this connection. | |
std::vector< unsigned char > | Encrypt (const std::vector< unsigned char > &in) |
std::vector< unsigned char > | Decrypt (const std::vector< unsigned char > &in) |
Private Attributes | |
EVP_CIPHER_CTX * | encryption_context |
EVP_CIPHER_CTX * | decryption_context |
unsigned int | blocksize |
Definition at line 14 of file AESEncrypter.hpp.
Botcraft::AESEncrypter::AESEncrypter | ( | ) |
Definition at line 20 of file AESEncrypter.cpp.
References blocksize, decryption_context, and encryption_context.
Botcraft::AESEncrypter::~AESEncrypter | ( | ) |
Definition at line 27 of file AESEncrypter.cpp.
References decryption_context, and encryption_context.
std::vector< unsigned char > Botcraft::AESEncrypter::Decrypt | ( | const std::vector< unsigned char > & | in | ) |
Definition at line 143 of file AESEncrypter.cpp.
References blocksize, decryption_context, and LOG_WARNING.
std::vector< unsigned char > Botcraft::AESEncrypter::Encrypt | ( | const std::vector< unsigned char > & | in | ) |
Definition at line 125 of file AESEncrypter.cpp.
References blocksize, encryption_context, and LOG_WARNING.
void Botcraft::AESEncrypter::Init | ( | const std::vector< unsigned char > & | pub_key, |
const std::vector< unsigned char > & | input_nonce, | ||
std::vector< unsigned char > & | raw_shared_secret, | ||
std::vector< unsigned char > & | encrypted_shared_secret, | ||
std::vector< unsigned char > & | encrypted_challenge | ||
) |
Initialize the encryption context for this connection.
pub_key | Server public key |
input_nonce | Server input nonce |
raw_shared_secret | Output shared secret |
encrypted_shared_secret | Shared secret encrypted using server public key |
encrypted_challenge | Output encrypted challenge |
Definition at line 51 of file AESEncrypter.cpp.
|
private |
Definition at line 57 of file AESEncrypter.hpp.
Referenced by AESEncrypter(), Decrypt(), and Encrypt().
|
private |
Definition at line 56 of file AESEncrypter.hpp.
Referenced by AESEncrypter(), Decrypt(), and ~AESEncrypter().
|
private |
Definition at line 55 of file AESEncrypter.hpp.
Referenced by AESEncrypter(), Encrypt(), and ~AESEncrypter().