|
Botcraft 1.21.10
|
#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 19 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 135 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 117 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 62 of file AESEncrypter.hpp.
Referenced by AESEncrypter(), Decrypt(), and Encrypt().
|
private |
Definition at line 61 of file AESEncrypter.hpp.
Referenced by AESEncrypter(), Decrypt(), and ~AESEncrypter().
|
private |
Definition at line 60 of file AESEncrypter.hpp.
Referenced by AESEncrypter(), Encrypt(), and ~AESEncrypter().