 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef HEADER_VERSION_HPP
27 #define HEADER_VERSION_HPP
29 #include "../my_config.h"
67 void set_command_line(
const std::string & line) {
cmd_line = line; };
69 void set_sym_crypto_algo(
const crypto_algo & algo) {
sym = algo; };
80 void set_signed(
bool is_signed) {
arch_signed = is_signed; };
82 void set_salt(
const std::string & arg) {
salt = arg; };
83 void set_iteration_count(
const infinint & arg) {
iteration_count = arg; };
88 const archive_version & get_edition()
const {
return edition; };
90 const std::string & get_command_line()
const {
return cmd_line; };
91 const infinint & get_initial_offset()
const {
return initial_offset; };
96 std::string get_sym_crypto_name()
const;
97 std::string get_asym_crypto_name()
const;
98 memory_file *get_crypted_key()
const {
return crypted_key; };
99 const slice_layout *get_slice_layout()
const {
return ref_layout; };
101 const std::string & get_salt()
const {
return salt; };
102 const infinint & get_iteration_count()
const {
return iteration_count; };
107 void display(user_interaction & dialg)
const;
static constexpr U_I FLAG_HAS_AN_EXTENDED_SIZE
the flag is two bytes length
hash_algo
hashing algorithm available
static constexpr U_I FLAG_HAS_CRYPTED_KEY
the header contains a symmetrical key encrypted with asymmetrical algorithm
compression
the different compression algorithm available
This is a pure virtual class that is used by libdar when interaction with the user is required.
static constexpr U_I FLAG_HAS_AN_SECOND_EXTENDED_SIZE
reserved for future use
static constexpr U_I FLAG_ARCHIVE_IS_SIGNED
archive is signed
compression parameters for API
defines the interaction interface between libdar and users.
std::string cmd_line
used long ago to store cmd_line, then abandonned, then recycled as a user comment field
static constexpr U_I FLAG_INITIAL_OFFSET
whether the header contains the initial offset (size of clear data before encrypted) NOTE : This valu...
switch module to limitint (32 ou 64 bits integers) or infinint
the arbitrary large positive integer class
bool ciphered
whether the archive is ciphered, even if we do not know its crypto algorithm (old archives)
class archive_version that rules which archive format to follow
std::string salt
used for key derivation
archive_version edition
archive format
static constexpr U_I FLAG_SAVED_EA_ROOT
no more used since version "05"
class archive_version manages the version of the archive format
slice_layout * ref_layout
optional field used in isolated catalogues to record the slicing layout of their archive of reference
void set_crypted_key(memory_file *key)
the object pointed to by key passes to the responsibility of this header_version object
bool arch_signed
whether the archive is signed
void write(generic_file &f) const
write down the object to the archive (as header if wrote at the beginning of the archive,...
static constexpr U_I FLAG_SAVED_EA_USER
no more used since version "05"
compression algo_zip
compression algorithm used
class generic_file is defined here as well as class fichier
static constexpr U_I FLAG_SCRAMBLED
scrambled or strong encryption used
memory_file * crypted_key
optional field containing the asymmetrically ciphered key used for strong encryption ciphering
object describing the slicing of an archive
static constexpr U_I FLAG_HAS_KDF_PARAM
archive header contains salt and non default interaction count
infinint initial_offset
defines at which offset starts the archive (passed the archive header), this field is obiously only u...
set of datastructures used to interact with a catalogue object
Memory_file is a generic_file class that only uses virtual memory.
static constexpr U_I FLAG_SEQUENCE_MARK
escape sequence marks present for sequential reading
generic_file stored in memory
hash_algo kdf_hash
used for key derivation
static constexpr U_I FLAG_HAS_REF_SLICING
the header contains the slicing information of the archive of reference (used for isolated catalogue)
this is the interface class from which all other data transfer classes inherit
bool has_tape_marks
whether the archive contains tape marks aka escape marks aka sequence marks
infinint iteration_count
used for key derivation
static constexpr U_I PRE_FORMAT_10_ITERATION
fixed value used for key derivation before archive format 10
void set_slice_layout(slice_layout *layout)
the object pointed to by layout is passed under the responsibility of this header_version object
crypto_algo
the different cypher available for encryption (strong or weak)
crypto_algo sym
strong encryption algorithm used for symmetrical encryption
the crypto algoritm definition
void read(generic_file &f, user_interaction &dialog, bool lax_mode)
read the header or trailer from the archive
libdar namespace encapsulate all libdar symbols