Wstępnie dodana klasa zarządzania szyfrowaniem. Dodana funckja szyfrująca i generowanie kluczy. Nie osadzono w klasie create cargo

This commit is contained in:
yanczi 2025-10-26 01:14:55 +02:00
parent de7ced2939
commit b80d983bc7
6 changed files with 67 additions and 14 deletions

20
EncryptionManager.h Normal file
View file

@ -0,0 +1,20 @@
#pragma once
#include <sodium.h>
#include <vector>
#include <array>
#include <stdexcept>
class EncryptionManager
{
public:
EncryptionManager();
~EncryptionManager() = default;
std::vector<char> encrypt(const std::vector<char>&);
//std::vector<char> decrypt(const std::vector<char>&);
private:
std::array<unsigned char, crypto_stream_chacha20_ietf_KEYBYTES> key{};
std::array<unsigned char, crypto_stream_chacha20_ietf_NONCEBYTES> nonce{};
};