mal-packet-weaver
C++20 packet serialization/deserialization library.
Loading...
Searching...
No Matches
encryption-interface.hpp
Go to the documentation of this file.
1#pragma once
2#include "../common.hpp"
4{
6 {
7 public:
8 virtual ~EncryptionInterface() = default;
9 virtual ByteArray encrypt(const ByteView plaintext) const = 0;
10 virtual ByteArray decrypt(const ByteView ciphertext) const = 0;
11 virtual void encrypt_in_place(ByteArray &plaintext) const = 0;
12 virtual void decrypt_in_place(ByteArray &ciphertext) const = 0;
13 };
14} // namespace mal_packet_weaver::crypto
virtual ByteArray decrypt(const ByteView ciphertext) const =0
virtual void encrypt_in_place(ByteArray &plaintext) const =0
virtual ByteArray encrypt(const ByteView plaintext) const =0
virtual void decrypt_in_place(ByteArray &ciphertext) const =0
A dynamically resizable array of bytes.
A lightweight view over a sequence of bytes.