32#ifndef GCRYPT_NO_DEPRECATED
33#define GCRYPT_NO_DEPRECATED
55 inline bool crypto_min_ver_libgcrypt_no_bug()
58 return gcry_check_version(MIN_VERSION_GCRYPT_HASH_BUG);
72 const std::string & salt,
80 crypto_sym & operator = (
crypto_sym && ref)
noexcept {
try { detruit(); move_from(std::move(ref)); }
catch(...) {}
return *
this; };
81 virtual ~crypto_sym() noexcept {
try { detruit(); }
catch(...) {} };
85 virtual U_32 encrypted_block_size_for(U_32 clear_block_size)
override;
86 virtual U_32 clear_block_allocated_size_for(U_32 clear_block_size)
override;
87 virtual U_32 encrypt_data(
const infinint & block_num,
88 const char *clear_buf,
89 const U_32 clear_size,
90 const U_32 clear_allocated,
91 char *crypt_buf, U_32 crypt_size)
override;
92 virtual U_32 decrypt_data(
const infinint & block_num,
93 const char *crypt_buf,
94 const U_32 crypt_size,
96 U_32 clear_size)
override;
97 virtual std::unique_ptr<crypto_module> clone()
const override;
126 const std::string & salt,
165 const std::string & salt,
172 const std::string & salt,
182#ifdef LIBDAR_NO_OPTIMIZATION
188 void detruit() {
throw Ecompilation(gettext(
"Strong encryption support (libgcrypt)")); };
189 void copy_from(
const crypto_sym & ref) {
throw Ecompilation(gettext(
"Strong encryption support (libgcrypt)")); };
190 void move_from(
crypto_sym && ref) {
throw Ecompilation(gettext(
"Strong encryption support (libgcrypt)")); };
class archive_version that rules which archive format to follow
exception used when a requested fearture has not beed activated at compilation time
class archive_version manages the version of the archive format
symetrical strong encryption, interface to grypt library
crypto_sym(const secu_string &password, const archive_version &reading_ver, crypto_algo algo, const std::string &salt, const infinint &iteration_count, hash_algo kdf_hash, bool use_pkcs5)
static size_t max_key_len_libdar(crypto_algo algo)
returns the max key length in octets to use to compute a key from a user provided password
static bool is_a_strong_password(crypto_algo algo, const secu_string &password)
check whether the given password is reported as strong in regard to the given cipher
const std::string & get_salt() const
give access to the calculated or provided salt
static size_t max_key_len(crypto_algo algo)
returns the max key length in octets for the given algorithm
the arbitrary large positive integer class
per block cryptography implementation
hash_algo
hashing algorithm available
crypto_algo
the different cypher available for encryption (strong or weak)
include macro defined by the configure script and some specific additional ones
libdar namespace encapsulate all libdar symbols
set of datastructures used to interact with a catalogue object
the crypto algoritm definition
this file contains the definition of secu_string class, a std::string like class but allocated in sec...