| Disk ARchive 2.8.6 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
archive_aux.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2026 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26
27#ifndef ARCHIVE_AUX_HPP
28#define ARCHIVE_AUX_HPP
29
30#include "../my_config.h"
31
32#include "integers.hpp"
33#include <string>
34
35 namespace libdar
36{
37
40
42
43 enum class modified_data_detection
44 {
45 any_inode_change,
46 mtime_size,
47 };
48
49
51
52 enum class comparison_fields
53 {
54 all,
55 ignore_owner,
56 mtime,
57 inode_type
58 };
59
61
62 enum class hash_algo
63 {
64 none,
65 md5,
66 sha1,
67 sha512,
68 argon2,
69 whirlpool
70 };
71
73 extern std::string hash_algo_to_string(hash_algo algo);
74
76
80 extern bool string_to_hash_algo(const std::string & arg, hash_algo & val);
81
83 extern U_I hash_algo_to_gcrypt_hash(hash_algo algo);
84
86 extern unsigned char hash_algo_to_char(hash_algo algo);
87
89
91 extern hash_algo char_to_hash_algo(unsigned char arg);
92
94
95} // end of namespace
96
97#endif
libdar::modified_data_detection
modified_data_detection
how to detect data has changed when some fields
Definition archive_aux.hpp:44
libdar::comparison_fields
comparison_fields
how to consider file change during comparison and incremental backup
Definition archive_aux.hpp:53
libdar::char_to_hash_algo
hash_algo char_to_hash_algo(unsigned char arg)
convert char to hash_algo
libdar::string_to_hash_algo
bool string_to_hash_algo(const std::string &arg, hash_algo &val)
convert string to hash algorithm
libdar::hash_algo_to_string
std::string hash_algo_to_string(hash_algo algo)
convert hash value to human readable string
libdar::hash_algo
hash_algo
hashing algorithm available
Definition archive_aux.hpp:63
libdar::hash_algo_to_char
unsigned char hash_algo_to_char(hash_algo algo)
convert hash value to char value
libdar::hash_algo_to_gcrypt_hash
U_I hash_algo_to_gcrypt_hash(hash_algo algo)
convert hash value to libgcrypt hash value
libdar::inode_type
inode_type
type of inode
Definition entrepot_aux.hpp:42
libdar::modified_data_detection::any_inode_change
@ any_inode_change
historical behavior, resave an inode on any metadata change
Definition archive_aux.hpp:45
libdar::modified_data_detection::mtime_size
@ mtime_size
default behavior since release 2.6.0 resave only if file size or mtime changed
Definition archive_aux.hpp:46
libdar::comparison_fields::ignore_owner
@ ignore_owner
consider any available field except ownership fields
Definition archive_aux.hpp:55
libdar::comparison_fields::mtime
@ mtime
consider any available field except ownership and permission fields
Definition archive_aux.hpp:56
libdar::comparison_fields::all
@ all
consider any available field for comparing inodes
Definition archive_aux.hpp:54
libdar::hash_algo::argon2
@ argon2
argon2 hash algorithm
Definition archive_aux.hpp:68
libdar::hash_algo::md5
@ md5
MD5 algorithm.
Definition archive_aux.hpp:65
libdar::hash_algo::none
@ none
no hashing algorithm
Definition archive_aux.hpp:64
libdar::hash_algo::sha1
@ sha1
SHA1 algorithm.
Definition archive_aux.hpp:66
libdar::hash_algo::sha512
@ sha512
SHA-512 algorithm.
Definition archive_aux.hpp:67
libdar::hash_algo::whirlpool
@ whirlpool
whirlpool hash algorithm
Definition archive_aux.hpp:69
integers.hpp
are defined here basic integer types that tend to be portable
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47