Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
CipherChunk.hpp
Go to the documentation of this file.
1#pragma once
2#include <Core/Core.hpp>
3
5
12 static constexpr const std::string_view TABLE_NAME = "CipherChunks";
13
14 std::int64_t idc{};
15 std::int64_t ide{};
16 std::int64_t offset{};
17 std::int64_t size{};
18 std::vector<::Enigma::byte> bytes{};
20 ~CipherChunk() = default;
21
22 public:
23 constexpr bool operator==(const CipherChunk& c) const noexcept { return idc == c.idc; }
24 friend std::ostream& operator<<(std::ostream& os, const CipherChunk& c) noexcept {
25 return os
26 << "CipherChunk(idc: " << c.idc << ','
27 << "ide: " << c.ide << ','
28 << "offset: " << c.offset << ','
29 << "size: " << c.size << ','
30 << "data: " << std::string(c.bytes.begin(), c.bytes.end()) << ')';
31 }
32 std::string toString() const noexcept {
33 std::ostringstream oss{};
34 oss << *this;
35 return oss.str();
36 }
37};
38
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition Macros.hpp:13
#define NS_ENIGMA_END
Definition Macros.hpp:14
std::int64_t offset
static constexpr const std::string_view TABLE_NAME
std::int64_t size
std::int64_t ide
friend std::ostream & operator<<(std::ostream &os, const CipherChunk &c) noexcept
std::vector<::Enigma::byte > bytes
~CipherChunk()=default
std::int64_t idc
std::string toString() const noexcept
constexpr bool operator==(const CipherChunk &c) const noexcept