Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
Encryption.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "CipherChunk.hpp"
4#include <Core/Core.hpp>
6
7#include <sstream> // std::ostringstream
8
10
14struct Encryption {
15 static constexpr const std::string_view TABLE_NAME = "Encryptions";
16
17 std::int64_t ide{};
19 std::string title{};
20 std::string date_time{};
21 std::int64_t size{};
22 bool is_file{};
23 std::string file_ext{};
25 ~Encryption() noexcept = default;
26
27 public:
28 constexpr bool operator==(const Encryption& e) const noexcept { return ide == e.ide; }
29 friend std::ostream& operator<<(std::ostream& os, const Encryption& e) noexcept {
30 return os
31 << "Encryptions(ide: " << e.ide << ','
32 << "algo: " << int(e.algo) << ','
33 << "title: " << e.title << ','
34 << "date_time: " << e.date_time << ','
35 << "is_file: " << std::boolalpha << e.is_file << ','
36 << "file_ext:" << e.file_ext << ')';
37 }
38 std::string toString() noexcept {
39 std::ostringstream oss{};
40 oss << *this;
41 return oss.str();
42 }
43};
44
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition Macros.hpp:13
#define NS_ENIGMA_END
Definition Macros.hpp:14
std::string date_time
friend std::ostream & operator<<(std::ostream &os, const Encryption &e) noexcept
std::string toString() noexcept
std::int64_t size
~Encryption() noexcept=default
static constexpr const std::string_view TABLE_NAME
std::int64_t ide
std::string file_ext
std::string title
Algorithm::Type algo