20 lines
No EOL
451 B
C++
20 lines
No EOL
451 B
C++
#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{};
|
|
}; |