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:
parent
de7ced2939
commit
b80d983bc7
6 changed files with 67 additions and 14 deletions
20
EncryptionManager.h
Normal file
20
EncryptionManager.h
Normal 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{};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue