![]() |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
manages the archive header and trailer More...
#include <header_version.hpp>
Public Member Functions | |
header_version (const header_version &ref) | |
header_version (header_version &&ref) noexcept | |
header_version & | operator= (const header_version &ref) |
header_version & | operator= (header_version &&ref) noexcept |
void | read (generic_file &f, user_interaction &dialog, bool lax_mode) |
read the header or trailer from the archive | |
void | write (generic_file &f) const |
write down the object to the archive (as header if wrote at the beginning of the archive, as trailer is at the end) | |
void | set_edition (const archive_version &ed) |
void | set_compression_algo (const compression &zip) |
void | set_command_line (const std::string &line) |
void | set_initial_offset (const infinint &offset) |
void | set_sym_crypto_algo (const crypto_algo &algo) |
void | set_crypted_key (memory_file *key) |
the object pointed to by key passes to the responsibility of this header_version object | |
void | clear_crypted_key () |
void | set_slice_layout (slice_layout *layout) |
the object pointed to by layout is passed under the responsibility of this header_version object | |
void | clear_slice_layout () |
void | set_tape_marks (bool presence) |
void | set_signed (bool is_signed) |
void | set_salt (const std::string &arg) |
void | set_iteration_count (const infinint &arg) |
void | set_kdf_hash (hash_algo algo) |
const archive_version & | get_edition () const |
compression | get_compression_algo () const |
const std::string & | get_command_line () const |
const infinint & | get_initial_offset () const |
bool | is_ciphered () const |
bool | is_signed () const |
crypto_algo | get_sym_crypto_algo () const |
std::string | get_sym_crypto_name () const |
std::string | get_asym_crypto_name () const |
memory_file * | get_crypted_key () const |
const slice_layout * | get_slice_layout () const |
bool | get_tape_marks () const |
const std::string & | get_salt () const |
const infinint & | get_iteration_count () const |
hash_algo | get_kdf_hash () const |
void | display (user_interaction &dialg) const |
void | clear () |
Private Member Functions | |
void | nullifyptr () noexcept |
void | copy_from (const header_version &ref) |
void | move_from (header_version &&ref) noexcept |
void | detruit () |
Private Attributes | |
archive_version | edition |
archive format | |
compression | algo_zip |
compression algorithm used | |
std::string | cmd_line |
used long ago to store cmd_line, then abandonned, then recycled as a user comment field | |
infinint | initial_offset |
defines at which offset starts the archive (passed the archive header), this field is obiously only used in the trailer not in the header | |
crypto_algo | sym |
strong encryption algorithm used for symmetrical encryption | |
memory_file * | crypted_key |
optional field containing the asymmetrically ciphered key used for strong encryption ciphering | |
slice_layout * | ref_layout |
optional field used in isolated catalogues to record the slicing layout of their archive of reference | |
bool | has_tape_marks |
whether the archive contains tape marks aka escape marks aka sequence marks | |
bool | ciphered |
whether the archive is ciphered, even if we do not know its crypto algorithm (old archives) | |
bool | arch_signed |
whether the archive is signed | |
std::string | salt |
used for key derivation | |
infinint | iteration_count |
used for key derivation | |
hash_algo | kdf_hash |
used for key derivation | |
Static Private Attributes | |
static constexpr U_I | FLAG_SAVED_EA_ROOT = 0x80 |
no more used since version "05" | |
static constexpr U_I | FLAG_SAVED_EA_USER = 0x40 |
no more used since version "05" | |
static constexpr U_I | FLAG_SCRAMBLED = 0x20 |
scrambled or strong encryption used | |
static constexpr U_I | FLAG_SEQUENCE_MARK = 0x10 |
escape sequence marks present for sequential reading | |
static constexpr U_I | FLAG_INITIAL_OFFSET = 0x08 |
whether the header contains the initial offset (size of clear data before encrypted) NOTE : This value is set internally by header_version, no need to set flag with it! But that's OK to set it or not, it will be updated according to initial_offset's value. | |
static constexpr U_I | FLAG_HAS_CRYPTED_KEY = 0x04 |
the header contains a symmetrical key encrypted with asymmetrical algorithm | |
static constexpr U_I | FLAG_HAS_REF_SLICING = 0x02 |
the header contains the slicing information of the archive of reference (used for isolated catalogue) | |
static constexpr U_I | FLAG_HAS_AN_EXTENDED_SIZE = 0x01 |
the flag is two bytes length | |
static constexpr U_I | FLAG_ARCHIVE_IS_SIGNED = 0x0200 |
archive is signed | |
static constexpr U_I | FLAG_HAS_KDF_PARAM = 0x0400 |
archive header contains salt and non default interaction count | |
static constexpr U_I | FLAG_HAS_AN_SECOND_EXTENDED_SIZE = 0x0101 |
reserved for future use | |
static constexpr U_I | PRE_FORMAT_10_ITERATION = 2000 |
fixed value used for key derivation before archive format 10 | |
manages the archive header and trailer
Definition at line 47 of file header_version.hpp.