Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
Meta::EnigmaFooter Struct Reference

Encrypted buffer footer. More...

#include <Meta.hpp>

Public Member Functions

size_type sizeInBytes () const noexcept
 
std::vector< byte > toBytes () const
 Convert instance of this struct to an array of bytes. More...
 

Static Public Member Functions

static EnigmaFooter fromBytes (const std::vector< byte > &bytes)
 
static EnigmaFooter fromBytes (const byte *bytes, const std::size_t bytesSize)
 
static EnigmaFooter fromBase64 (const std::string &base64)
 
static EnigmaFooter fromFile (const fs::path &filename)
 

Public Attributes

magic_t magic = ENIGMA_MAGIC
 Enigma magic number. More...
 
std::uint64_t version = ENIGMA_VERSION_MAJOR * 100'000 + ENIGMA_VERSION_MINOR * 1000 + ENIGMA_VERSION_PATCH
 Enigma version used in encryption. More...
 
Algorithm::Type algo {}
 Algorithm enum id used for encryption. More...
 
std::array< byte, CryptoPP::SHA256::DIGESTSIZE > hash {}
 SHA2-256 Hash of the original file or text, used to ensure decryption is successful. More...
 
std::vector< byte > iv {}
 IV used encryption. More...
 
std::vector< byte > extra {}
 Extra data (for example mac for ChaCha20Poly1305) More...
 

Detailed Description

Encrypted buffer footer.

Definition at line 31 of file Meta.hpp.

Member Function Documentation

◆ fromBase64()

static EnigmaFooter Meta::EnigmaFooter::fromBase64 ( const std::string &  base64)
static

◆ fromBytes() [1/2]

static EnigmaFooter Meta::EnigmaFooter::fromBytes ( const byte *  bytes,
const std::size_t  bytesSize 
)
static

◆ fromBytes() [2/2]

static EnigmaFooter Meta::EnigmaFooter::fromBytes ( const std::vector< byte > &  bytes)
static

◆ fromFile()

static EnigmaFooter Meta::EnigmaFooter::fromFile ( const fs::path &  filename)
static

◆ sizeInBytes()

size_type Meta::EnigmaFooter::sizeInBytes ( ) const
noexcept

◆ toBytes()

std::vector<byte> Meta::EnigmaFooter::toBytes ( ) const

Convert instance of this struct to an array of bytes.

Member Data Documentation

◆ algo

Algorithm::Type Meta::EnigmaFooter::algo {}

Algorithm enum id used for encryption.

Definition at line 37 of file Meta.hpp.

◆ extra

std::vector<byte> Meta::EnigmaFooter::extra {}

Extra data (for example mac for ChaCha20Poly1305)

Definition at line 43 of file Meta.hpp.

◆ hash

std::array<byte, CryptoPP::SHA256::DIGESTSIZE> Meta::EnigmaFooter::hash {}

SHA2-256 Hash of the original file or text, used to ensure decryption is successful.

Definition at line 39 of file Meta.hpp.

◆ iv

std::vector<byte> Meta::EnigmaFooter::iv {}

IV used encryption.

Definition at line 41 of file Meta.hpp.

◆ magic

magic_t Meta::EnigmaFooter::magic = ENIGMA_MAGIC

Enigma magic number.

Definition at line 33 of file Meta.hpp.

◆ version

std::uint64_t Meta::EnigmaFooter::version = ENIGMA_VERSION_MAJOR * 100'000 + ENIGMA_VERSION_MINOR * 1000 + ENIGMA_VERSION_PATCH

Enigma version used in encryption.

Definition at line 35 of file Meta.hpp.


The documentation for this struct was generated from the following file: